# kernel 2.6 and my harddisk ...

## mugurelu

I've noticed something strange after an upgrade to 2.6:

```
enkidu root # hdparm -i /dev/hda

/dev/hda:

 Model=Maxtor 6Y120P0, FwRev=YAR41BW0, SerialNo=Y41E78JE

 Config={ Fixed }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57

 BuffType=DualPortCache, BuffSize=7936kB, MaxMultSect=16, MultSect=16

 CurCHS=4047/16/255, CurSects=16511760, LBA=yes, LBAsects=240121728

 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio1 pio2 pio3 pio4 

 DMA modes:  mdma0 mdma1 mdma2 

 UDMA modes: udma0 udma1 udma2 

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: (null): 

 * signifies the current active mode
```

As you can see, hdparm say that there is no pio or dma active for my hard drive (there is no * sign in front on any of those options).

Performance seems to be OK:

```
enkidu root # hdparm -tT /dev/hda

/dev/hda:

 Timing buffer-cache reads:   764 MB in  2.01 seconds = 380.35 MB/sec

 Timing buffered disk reads:  150 MB in  3.01 seconds =  49.82 MB/sec

```

Any ideas about what is wrong ? For example, for my second hard disk (a quantum fireball), udma4 is highlighted ...

----------

## dsd

when you run "hdparm /dev/hda" does it say that using_dma is 'yes'?

did you compile support into your kernel for your IDE controller?

----------

## Vivid5500

The WIERD thing is I have the complete opposite as you mugurelu.

Look at this:

```

bash-2.05b# hdparm -i /dev/hda

/dev/hda:

 Model=Maxtor 6Y160P0, FwRev=YAR41BW0, SerialNo=Y41G4DZE

 Config={ Fixed }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57

 BuffType=DualPortCache, BuffSize=7936kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455

 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio1 pio2 pio3 pio4

 DMA modes:  mdma0 mdma1 mdma2

 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: (null):

 * signifies the current active mode

```

Which indicates that its set to UDMA6 (as it should be) since my drive is said to be UDMA 133. Now the wierd part is the performance, look at this:

```

bash-2.05b# hdparm -tT /dev/hda

/dev/hda:

 Timing buffer-cache reads:   996 MB in  2.00 seconds = 497.58 MB/sec

 Timing buffered disk reads:    4 MB in  3.19 seconds =   1.25 MB/sec

```

Now how wierd is that? I posted a similar thread earlier today but nobody has replied yet. I have an A7N8X Deluxe and I built in AMD and nVidia support. There is a wierd part though, in dmesg:

```

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

NFORCE2: IDE controller at PCI slot 0000:00:09.0

NFORCE2: chipset revision 162

NFORCE2: not 100% native mode: will probe irqs later

NFORCE2: BIOS didn't set cable bits correctly. Enabling workaround.

```

Which leads me to believe its the BIOS thats causing the problem. Any body have any similar problems?

----------

## dsd

i dont think those messages are causing any problems, at least, they arent for me on my Abit nf7-S.

```
-> dmesg | grep NFORCE2

NFORCE2: IDE controller at PCI slot 0000:00:09.0

NFORCE2: chipset revision 162

NFORCE2: not 100% native mode: will probe irqs later

NFORCE2: BIOS didn't set cable bits correctly. Enabling workaround.

NFORCE2: 0000:00:09.0 (rev a2) UDMA133 controller

-> hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:  164 MB in  3.01 seconds =  54.48 MB/sec

```

----------

## Vivid5500

Thats so wierd.. I have no clue as to why my performance is so bad compared to everybody else's..

----------

## mugurelu

```
enkidu root # hdparm /dev/hda

/dev/hda:

 multcount    = 16 (on)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 65535/16/63, sectors = 240121728, start = 0
```

Ies, I selected the required IDE controller in the kernel (VIA).

----------

## mugurelu

The problem may reside somewhere else, not in kernel 2.6, as I believed initially. I just booted with the 2.4.20 gentoo-sources kernel, and the problem is manifesting there too. 

I can't complain the performance (50MB/s is nice, i think  :Smile:  ), but why the hell that stinkin' * does not appear where it should be ?

----------

## Insanity5902

I just foudn this in another post ... basically instead of generic ide, goto pci ide and then generic pci-bus master and then you should see your chipset  :Razz: 

https://forums.gentoo.org/viewtopic.php?p=798408#798408

I will let you know how it works

----------

## Insanity5902

yeah that worked, but now for some reason mine is stuck at 33mhz.  I might have a bad cable in there   :Shocked: 

[edit]

okay or not, I just read the specs for my drive and it read time maxes out at 35 mb/s and I am getting 33.72 in my buffered disk reads. hmm oh well

[/edit]

----------

## dsd

33mhz is good.

lower is better, for once.

----------

## Insanity5902

not when it is supposed to run at 133 mhz ?

----------

## geoffs

i have been having issues with correct speeds. Mobo is an Abit NF7 (nforce2), everything else works fine.

hdparm /dev/hda

```

/dev/hda:

 multcount    = 16 (on)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 16383/255/63, sectors = 234441648, start = 0

```

hdparm -tT /dev/hda

```

/dev/hda:

 Timing buffer-cache reads:   2040 MB in  2.00 seconds = 1019.65 MB/sec

 Timing buffered disk reads:   78 MB in  3.02 seconds =  25.87 MB/sec

```

dmesg snippet

```

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

NFORCE2: IDE controller at PCI slot 0000:00:09.0

NFORCE2: chipset revision 162

NFORCE2: not 100% native mode: will probe irqs later

NFORCE2: 0000:00:09.0 (rev a2) UDMA133 controller

    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA

hda: WDC WD1200JB-00DUA3, ATA DISK drive

Using cfq io scheduler

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hdc: LITE-ON LTR-52246S, ATAPI CD/DVD-ROM drive

hdd: SONY DVD-ROM DDU1211, ATAPI CD/DVD-ROM drive

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 1024KiB

hda: 234441648 sectors (120034 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(33)

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4

hdc: ATAPI 52X CD-ROM CD-R/RW CD-MRW drive, 2048kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

hdd: ATAPI 40X DVD-ROM drive, 512kB Cache, UDMA(33)

```

uname -a

```

Linux opbot 2.6.4-rc2-love1 #1 Wed Mar 10 15:22:17 Local time zone must be set--see zic manu i686 AMD Athlon(tm) XP 3200+ AuthenticAMD GNU/Linux

```

I have a 120GB WD JB (8mb cache) it should be detected / running at udma(100) not udma(33). And based on hdparm on other gentoo machines with the same drive my disk reads should be double.

Any ideas?

----------

## dsd

 *Quote:*   

> not when it is supposed to run at 133 mhz ?

 

its not. the bus speed is a different thing entirely. lower is better, 33mhz is right for nforce2, i believe most other boards have 66mhz.

 *geoffs wrote:*   

> I have a 120GB WD JB (8mb cache) it should be detected / running at udma(100) not udma(33). And based on hdparm on other gentoo machines with the same drive my disk reads should be double.

 

are you using 80 conductor cables? is there anything else on the same IDE cable alongside the HDD?

----------

## geoffs

dsd: I am using 80pin cable and there isn't anything else on that channel. I will switch out the cable to make sure it isn't the culprit.

----------

## dsd

also check bios settings. either set it to auto or run the IDE HDD AUTO DETECTION.

----------

## geoffs

well dsd, that was it, for some reason UDMA was disabled in the BIOS. If other NF7 owners are having troubles I suggest starting in there. I didn't disable this setting, so I assume it was like this from the factory.

thanks for the help! Made all those kernel recompiles pretty pointless...but still fun.   :Very Happy: 

----------

## Insanity5902

 *dsd wrote:*   

>  *Quote:*   not when it is supposed to run at 133 mhz ? 
> 
> its not. the bus speed is a different thing entirely. lower is better, 33mhz is right for nforce2, i believe most other boards have 66mhz.

 

I am sorry for my ignorance, but I work in the IT world and only work on linux when it is on my personal PC.  I have not heard of this beofre, do you mind elaborating on this speed and what it is for, etc.  Or do you have link where I could read up on this.  I like to pride myself of knowing just about everything with comptuers and i have never heard of this speed before.  I feel like such a n00b again  :Razz: 

----------

## neenee

if you have a normal pci motherboard, your bus speed should always

be 33 mhz (ide runs over pci bus). this is something else than the

numbers ata 66/100/133. that is is the speed in mbit/s that the bus

supports as in protocol. a pci bus of 33 mhz and 32 bit can theoretically

support a data throughput of 33 * 10^6 * 4 bytes / sec = 133 mbyte/s,

which is enough for all ata modes available today (one byte is 8 bits).

normal ata 133 is therefore at the limit of what a *normal* pci bus can

support. ofcourse there is also 64 bit pci and/or 66mhz pci bus, but you

normally won't have those. serial ata is the next generation and i don't

know how that is done.

conclusion: the ide bus (or pci) speed at 33 mhz is just fine.

look for transfer mode instead: hdparm -X??

----------

## Insanity5902

Okay that makes sense.  I just wasn't understanding where the 33 was coming from.  I didn't know the ide speed came from the pci bus.  It is true, you learn something knew everyday.

So I am guessing that sata ... i guess works off of its own bus.  I am suing it on my linux box with raid 0, quite ncie with two WD Raptors  :Razz: 

----------

