Bug 5440

Summary: Perc4 megaraid: module doesn't detect cache memory and writeback mode
Product: SCSI Drivers Reporter: Derumier Alexandre (spirit)
Component: OtherAssignee: Mike Anderson (andmike)
Status: REJECTED INSUFFICIENT_DATA    
Severity: high CC: protasnb
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.9 -> 2.6.13 Subsystem:
Regression: --- Bisected commit-id:

Description Derumier Alexandre 2005-10-14 03:49:59 UTC
Most recent kernel where this bug did not occur:
Distribution: debian sarge - gentoo 2005
Hardware Environment: Dell Poweredge 2850 Perc4
Software Environment:
Problem Description:

kernel doesn't detect cache memory of Perc4 card and go in write through mode.

writing performances are really bad. (i have a raid10 with 6 disks)

here the dmesg:


> megaraid: fw version:[513O] bios version:[H418]
> scsi0 : LSI Logic MegaRAID driver
> scsi[0]: scanning scsi channel 0 [Phy 0] for non-raid devices
> scsi[0]: scanning scsi channel 1 [Phy 1] for non-raid devices
>   Vendor: PE/PV     Model: 1x8 SCSI BP       Rev: 1.0
>   Type:   Processor                          ANSI SCSI revision: 02
> scsi[0]: scanning scsi channel 2 [virtual] for logical drives
>   Vendor: MegaRAID  Model: LD 0 RAID5  139G  Rev: 513O
>   Type:   Direct-Access                      ANSI SCSI revision: 02
> SCSI device sda: 286228480 512-byte hdwr sectors (146549 MB)
> sda: asking for cache data failed
> sda: assuming drive cache: write through
Comment 1 Andrew Morton 2005-10-14 10:09:22 UTC
(Could we pleeeeze have a megaraid entry in the MAINTAINERS file?)

Begin forwarded message:

Date: Fri, 14 Oct 2005 03:52:20 -0700
From: bugme-daemon@kernel-bugs.osdl.org
To: bugme-new@lists.osdl.org
Subject: [Bugme-new] [Bug 5440] New: Perc4 megaraid: module doesn't detect cache memory and writeback mode


http://bugzilla.kernel.org/show_bug.cgi?id=5440

           Summary: Perc4 megaraid:  module doesn't detect cache memory and
                    writeback mode
    Kernel Version: 2.6.9 -> 2.6.13
            Status: NEW
          Severity: high
             Owner: andmike@us.ibm.com
         Submitter: spirit@cscup.com


Most recent kernel where this bug did not occur:
Distribution: debian sarge - gentoo 2005
Hardware Environment: Dell Poweredge 2850 Perc4
Software Environment:
Problem Description:

kernel doesn't detect cache memory of Perc4 card and go in write through mode.

writing performances are really bad. (i have a raid10 with 6 disks)

here the dmesg:


> megaraid: fw version:[513O] bios version:[H418]
> scsi0 : LSI Logic MegaRAID driver
> scsi[0]: scanning scsi channel 0 [Phy 0] for non-raid devices
> scsi[0]: scanning scsi channel 1 [Phy 1] for non-raid devices
>   Vendor: PE/PV     Model: 1x8 SCSI BP       Rev: 1.0
>   Type:   Processor                          ANSI SCSI revision: 02
> scsi[0]: scanning scsi channel 2 [virtual] for logical drives
>   Vendor: MegaRAID  Model: LD 0 RAID5  139G  Rev: 513O
>   Type:   Direct-Access                      ANSI SCSI revision: 02
> SCSI device sda: 286228480 512-byte hdwr sectors (146549 MB)
> sda: asking for cache data failed
> sda: assuming drive cache: write through

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

Comment 2 Margit Schubert-While 2005-10-14 12:17:39 UTC
A few comments here (based on our 2850) :
> megaraid: fw version:[513O] bios version:[H418]

Recommend you update your BIOS - Current is :
megaraid: fw version:[521S] bios version:[H430]

> Model: 1x8 SCSI BP

You have a single channel backplane.
For RAID, a split backplane is far better eg. -
<6>scsi[0]: scanning scsi channel 0 [Phy 0] for non-raid devices
<5>  Vendor: PE/PV     Model: 1x2 SCSI BP       Rev: 1.0
<5>  Type:   Processor                          ANSI SCSI revision: 02
<6>scsi[0]: scanning scsi channel 1 [Phy 1] for non-raid devices
<5>  Vendor: PE/PV     Model: 1x4 SCSI BP       Rev: 1.0
<5>  Type:   Processor                          ANSI SCSI revision: 02


Correct me somebody if I am wrong, but with the kernel assuming
write-through, it is actually working optimally as it assumes that
the devices/controllers/whatever are pushing the data directly to
the disks. Of course, if they are actually in write-back, you have lost
your resilience.
If the kernel detected write-back, it should work SLOWER as it would
then send SCSI flush commands.

The megaraid driver does not use MSI. 
Possible performance penalty ? Andrew ?

However, I think the basic problem is using RAID 10 on one channel.
I would simply use RAID 1 and have 3 disks mirrored each being it's
own file system.
Comment 3 Anonymous Emailer 2005-10-14 14:21:57 UTC
Reply-To: Neela.Kolli@engenio.com

>(Could we pleeeeze have a megaraid entry in the MAINTAINERS file?)

Hi Andrew,
I am taking over all Megaraid SCSI drivers.  Here is the new patch for
MAINTENERS file.  This will apply against 2.6.14-rc4.
Thanks,
Neela Syam Kolli.

Signed-off-by: Neela Syam Kolli <Neela.Kolli@engenio.com>

diff -Naur 2.6.14-rc4-old/MAINTAINERS 2.6.14-rc4-new/MAINTAINERS
--- 2.6.14-rc4-old/MAINTAINERS  2005-10-14 18:12:08.355382552 -0400
+++ 2.6.14-rc4-new/MAINTAINERS  2005-10-14 18:15:40.512129824 -0400
@@ -1618,6 +1618,13 @@
 L:     linux-fbdev-devel@lists.sourceforge.net
 S:     Maintained
 
+MEGARAID SCSI DRIVERS
+P:     Neela Syam Kolli
+M:     Neela.Kolli@engenio.com
+S:     linux-scsi@vger.kernel.org
+W:     http://megaraid.lsilogic.com
+S:     Maintained
+
 MEMORY TECHNOLOGY DEVICES
 P:     David Woodhouse
 M:     dwmw2@infradead.org



Comment 4 Derumier Alexandre 2005-10-14 23:36:32 UTC
Margit Schubert-While :  
  
my perc4  is configured in write back mode. so this is the main problem, the 
kernel detect write through and doesn't use cache. 
 
my raid10 is on 2 channel (this is the dmesg of an another server with a raid1 
array) 
 
 
 
 
 
Comment 5 Margit Schubert-While 2005-10-15 01:07:54 UTC
Derumier -
Which cache ? - The Linux file cache ? - It does.
The adapter cache ? - Depends on "cache policy" in adapter firmware.
However the "cache policy" on applies to reads.
Also the "stripe size" plays a major role in RAID 10.

As I said, recommend you update to Dell BIOS A04 (suuport.dell.com)

I do not have any disk performance problem on the 2850 (BIOS A04) with
RAID 1 (disks mirrored on second channel).

I DO have a problem with this :
/proc/mtrr
reg00: base=0x00000000 (   0MB), size=4096MB: write-back, count=1
reg01: base=0x100000000 (4096MB), size= 512MB: write-back, count=1
reg02: base=0xe0000000 (3584MB), size= 512MB: uncachable, count=1

But that's another story.
Comment 6 Natalie Protasevich 2007-07-22 02:56:30 UTC
Any updates on this problem, does it still exest with new kernel(2.6.22+)?
Thanks.
Comment 7 Natalie Protasevich 2008-03-14 23:34:54 UTC
I am going to close this bug for inactivity.
Neela, are you around? Do you mind me closing this bug or is there any unfinished business?