2003-07-17 21:00:42

by Jeff Garzik

[permalink] [raw]
Subject: libata driver update posted

Just updated libata library and associated ata_piix driver with several
bug fixes and internal improvements. It now works in 2.6 (again).

Next update will add several host drivers, now that the libata API is
settling down.


2.4.21-based patch:
ftp://ftp.??.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.4/2.4.21-libata4.patch.bz2

2.4.21-based BitKeeper repo:
bk://kernel.bkbits.net/jgarzik/atascsi-2.4

2.6.0-test1-based patch:
ftp://ftp.??.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/2.6.0-test1-libata1.patch.bz2

2.6.0-test1-based BitKeeper repo:
bk://kernel.bkbits.net/jgarzik/atascsi-2.5
(yes, "2.5" is not a typo, I haven't changed the name to 2.6 yet)


Remove the ".??" if the file has not appeared on your favorite
kernel.org mirror yet.


Changes:
* beginnings of pluggable timing configuration
* beginnings of cable detection
* much improved ATA device probing
* a bunch of internal improvements and cleanups (too many to list)
* additional of DocBook documentation
* many bug fixes


Subject: Re: libata driver update posted

> Next update will add several host drivers, now that the libata API is
> settling down.

Sii3112A is/will be supported?
Thanks!

>
>
> 2.4.21-based patch:
> ftp://ftp.??.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.4/2.4.21-libata4.patch.bz2
>
> 2.4.21-based BitKeeper repo:
> bk://kernel.bkbits.net/jgarzik/atascsi-2.4
>
> 2.6.0-test1-based patch:
> ftp://ftp.??.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/2.6.0-test1-libata1.patch.bz2
>
> 2.6.0-test1-based BitKeeper repo:
> bk://kernel.bkbits.net/jgarzik/atascsi-2.5
> (yes, "2.5" is not a typo, I haven't changed the name to 2.6 yet)
>
>
> Remove the ".??" if the file has not appeared on your favorite
> kernel.org mirror yet.
>
>
> Changes:
> * beginnings of pluggable timing configuration
> * beginnings of cable detection
> * much improved ATA device probing
> * a bunch of internal improvements and cleanups (too many to list)
> * additional of DocBook documentation
> * many bug fixes
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

---
Catalin(ux) BOIE
[email protected]

2003-07-18 12:59:07

by Jeff Garzik

[permalink] [raw]
Subject: Re: libata driver update posted

Catalin BOIE wrote:
>>Next update will add several host drivers, now that the libata API is
>>settling down.
>
>
> Sii3112A is/will be supported?


Yes, will be.

Silicon Image and Promise support are most likely next.

Jeff



2003-07-18 15:31:45

by Jeff Garzik

[permalink] [raw]
Subject: Re: libata driver update posted

On Fri, Jul 18, 2003 at 05:39:32PM +0200, Martin Schlemmer wrote:
> On Fri, 2003-07-18 at 15:13, Jeff Garzik wrote:
> > Catalin BOIE wrote:
> > >>Next update will add several host drivers, now that the libata API is
> > >>settling down.
> > >
> > >
> > > Sii3112A is/will be supported?
> >
> >
> > Yes, will be.
> >
> > Silicon Image and Promise support are most likely next.
> >
>
> How is performance compared to the default driver for the ICH5 SATA ?

I haven't done any comparisons because the "default driver" just flat
out doesn't work for me.

However, if performance is lower, then I consider that a bug.

Jeff



2003-07-18 15:31:46

by Martin Schlemmer

[permalink] [raw]
Subject: Re: libata driver update posted

On Fri, 2003-07-18 at 15:13, Jeff Garzik wrote:
> Catalin BOIE wrote:
> >>Next update will add several host drivers, now that the libata API is
> >>settling down.
> >
> >
> > Sii3112A is/will be supported?
>
>
> Yes, will be.
>
> Silicon Image and Promise support are most likely next.
>

How is performance compared to the default driver for the ICH5 SATA ?


Thanks,


--
Martin Schlemmer


2003-07-19 00:15:16

by Martin Schlemmer

[permalink] [raw]
Subject: Re: libata driver update posted

On Fri, 2003-07-18 at 17:43, Jeff Garzik wrote:

> > How is performance compared to the default driver for the ICH5 SATA ?
>
> I haven't done any comparisons because the "default driver" just flat
> out doesn't work for me.
>
> However, if performance is lower, then I consider that a bug.
>

Question if you do not mind me being a tad lazy - in ZA SCSI is damn
expensive, so not much experience ... is there something like hdparm -t
to check throughput ?


Thanks,

--

Martin Schlemmer




Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2003-07-19 00:26:16

by Alan

[permalink] [raw]
Subject: Re: libata driver update posted

On Sad, 2003-07-19 at 01:30, Martin Schlemmer wrote:
> Question if you do not mind me being a tad lazy - in ZA SCSI is damn
> expensive, so not much experience ... is there something like hdparm -t
> to check throughput ?

Yeah. try hdparm -t 8)

2003-07-19 00:29:59

by Andre Tomt

[permalink] [raw]
Subject: Re: libata driver update posted

On l?, 2003-07-19 at 02:30, Martin Schlemmer wrote:
> On Fri, 2003-07-18 at 17:43, Jeff Garzik wrote:
>
> > > How is performance compared to the default driver for the ICH5 SATA ?
> >
> > I haven't done any comparisons because the "default driver" just flat
> > out doesn't work for me.
> >
> > However, if performance is lower, then I consider that a bug.
> >
>
> Question if you do not mind me being a tad lazy - in ZA SCSI is damn
> expensive, so not much experience ... is there something like hdparm -t
> to check throughput ?

hdparm -t works on scsi too. and md, and, well, any block device?

:-)

--
Cheers,
Andr? Tomt
[email protected]

2003-07-19 00:37:41

by Martin Schlemmer

[permalink] [raw]
Subject: Re: libata driver update posted

On Sat, 2003-07-19 at 02:38, Alan Cox wrote:
> On Sad, 2003-07-19 at 01:30, Martin Schlemmer wrote:
> > Question if you do not mind me being a tad lazy - in ZA SCSI is damn
> > expensive, so not much experience ... is there something like hdparm -t
> > to check throughput ?
>
> Yeah. try hdparm -t 8)

*g* thanks :P


regards,

--

Martin Schlemmer




Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2003-07-19 19:55:36

by Martin Schlemmer

[permalink] [raw]
Subject: Re: libata driver update posted

On Fri, 2003-07-18 at 17:43, Jeff Garzik wrote:
> On Fri, Jul 18, 2003 at 05:39:32PM +0200, Martin Schlemmer wrote:
> > How is performance compared to the default driver for the ICH5 SATA ?
>
> I haven't done any comparisons because the "default driver" just flat
> out doesn't work for me.
>
> However, if performance is lower, then I consider that a bug.
>

Slower this side. The Maxtor 40GB (ata133) is however just set to
udma33, where the Seagate 20GB (ata100) driver is set correctly to
udma100.

The Seagate start off ok (about 35mb/s), but then after doing some heavy
disk io, it also just drops to the 20mb/s region.

=================== Normal ATA driver ====================

---------------------------------------------------------------------
nosferatu root # hdparm -Tt /dev/hdc

/dev/hdc:
Timing buffer-cache reads: 3364 MB in 2.00 seconds = 1682.26 MB/sec
Timing buffered disk reads: 120 MB in 3.01 seconds = 39.82 MB/sec
nosferatu root # hdparm -Tt /dev/hde

/dev/hde:
Timing buffer-cache reads: 3368 MB in 2.00 seconds = 1684.26 MB/sec
Timing buffered disk reads: 124 MB in 3.01 seconds = 41.19 MB/sec
nosferatu root # hdparm -Tt /dev/hdc

/dev/hdc:
Timing buffer-cache reads: 3372 MB in 2.00 seconds = 1683.73 MB/sec
Timing buffered disk reads: 120 MB in 3.01 seconds = 39.86 MB/sec
nosferatu root # hdparm -Tt /dev/hde

/dev/hde:
Timing buffer-cache reads: 3384 MB in 2.00 seconds = 1691.41 MB/sec
Timing buffered disk reads: 124 MB in 3.01 seconds = 41.20 MB/sec
nosferatu root #
---------------------------------------------------------------------
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
ICH5: IDE controller at PCI slot 0000:00:1f.1
PCI: Enabling device 0000:00:1f.1 (0005 -> 0007)
ICH5: chipset revision 2
ICH5: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:pio
hda: ASUS DVD-ROM E616, ATAPI CD/DVD-ROM drive
hdb: ASUS CRW-2410A, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: MAXTOR 6L040J2, ATA DISK drive
hdd: LS-120 COSM 04 UHD Floppy, ATAPI FLOPPY drive
ide1 at 0x170-0x177,0x376 on irq 15
ICH5-SATA: IDE controller at PCI slot 0000:00:1f.2
ICH5-SATA: chipset revision 2
ICH5-SATA: 100% native mode on irq 18
ide2: BM-DMA at 0xef60-0xef67, BIOS settings: hde:DMA, hdf:pio
ide3: BM-DMA at 0xef68-0xef6f, BIOS settings: hdg:pio, hdh:pio
hde: ST320011A, ATA DISK drive
ide2 at 0xefe0-0xefe7,0xefae on irq 18
hdc: max request size: 128KiB
hdc: host protected area => 1
hdc: 78177792 sectors (40027 MB) w/1819KiB Cache, CHS=77557/16/63,
UDMA(100)
/dev/ide/host0/bus1/target0/lun0: p1
hde: max request size: 128KiB
hde: host protected area => 1
hde: 39102336 sectors (20020 MB) w/2048KiB Cache, CHS=38792/16/63,
UDMA(100)
/dev/ide/host2/bus0/target0/lun0: p1 p2 p3 p4
end_request: I/O error, dev hda, sector 0
hda: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.12
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
Vendor: ASUS Model: CRW-2410A Rev: 1.0
Type: CD-ROM ANSI SCSI revision: 02
scsi1 : SCSI host adapter emulation for IDE ATAPI devices
Vendor: MATSHITA Model: LS-120 COSM 04 Rev: 0270
Type: Direct-Access ANSI SCSI revision: 00
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
sr0: scsi-1 drive
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 5
Attached scsi generic sg1 at scsi1, channel 0, id 0, lun 0, type 0
---------------------------------------------------------------------

=========================The libata driver ======================

---------------------------------------------------------------------
nosferatu root # hdparm -tT /dev/sda

/dev/sda:
Timing buffer-cache reads: 3412 MB in 2.00 seconds = 1705.41 MB/sec
Timing buffered disk reads: 66 MB in 3.08 seconds = 21.43 MB/sec
nosferatu root # hdparm -tT /dev/sdb

/dev/sdb:
Timing buffer-cache reads: 3368 MB in 2.00 seconds = 1683.41 MB/sec
Timing buffered disk reads: 68 MB in 3.03 seconds = 22.46 MB/sec
nosferatu root # hdparm -tT /dev/sda

/dev/sda:
Timing buffer-cache reads: 3376 MB in 2.00 seconds = 1688.26 MB/sec
Timing buffered disk reads: 66 MB in 3.08 seconds = 21.42 MB/sec
nosferatu root # hdparm -tT /dev/sdb

/dev/sdb:
Timing buffer-cache reads: 3396 MB in 2.00 seconds = 1698.26 MB/sec
Timing buffered disk reads: 68 MB in 3.03 seconds = 22.45 MB/sec
nosferatu root #
-------------------------------------------------------------------
ata_piix version 0.92
PCI: Enabling device 0000:00:1f.1 (0005 -> 0007)
PCI: Setting latency timer of device 0000:00:1f.1 to 64
ata1: PATA max UDMA/33 cmd 0x1F0 ctl 0x3F6 bmdma 0xFC00 irq 14
ata1: unhandled bus state 0
ata1: dev 0 cfg 49:0b00 82:0000 83:0000 84:0000 85:0000 86:0000 87:0000
88:043f
ata1: dev 0 ATAPI, max UDMA/100
ata1: dev 1 cfg 49:0b00 82:0000 83:0000 84:0000 85:0000 86:0000 87:0000
88:0407
ata1: dev 1 ATAPI, max UDMA/33
ata1: dev 0 configured for UDMA/33
ata1: dev 1 configured for UDMA/33
scsi0 : ata_piix
Vendor: ASUS Model: DVD-ROM E616 Rev: Z.2
Type: CD-ROM ANSI SCSI revision: 00
Vendor: ASUS Model: CRW-2410A Rev: 1.0
Type: CD-ROM ANSI SCSI revision: 00
ata2: PATA max UDMA/33 cmd 0x170 ctl 0x376 bmdma 0xFC08 irq 15
ata2: unhandled bus state 0
ata2: dev 0 cfg 49:0f00 82:346b 83:5b01 84:4003 85:3469 86:1a01 87:4003
88:207f
ata2: dev 0 ATA, max UDMA/133, 78177792 sectors
ata2: dev 0 configured for UDMA/33
scsi1 : ata_piix
Vendor: ATA Model: MAXTOR 6L040J2 Rev: 0.65
Type: Direct-Access ANSI SCSI revision: 05
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ata3: SATA max UDMA/133 cmd 0xEFE0 ctl 0xEFAE bmdma 0xEF60 irq 18
ata4: SATA max UDMA/133 cmd 0xEFA0 ctl 0xEFAA bmdma 0xEF68 irq 18
ata3: dev 0 cfg 49:2f00 82:346b 83:4b01 84:4000 85:3469 86:0201 87:4000
88:203f
ata3: dev 0 ATA, max UDMA/100, 39102336 sectors
ata3: dev 0 configured for UDMA/100
scsi2 : ata_piix
Vendor: ATA Model: ST320011A Rev: 0.65
Type: Direct-Access ANSI SCSI revision: 05
ata4: thread exiting
scsi3 : ata_piix
libata version 0.65 loaded.
SCSI device sda: 78177792 512-byte hdwr sectors (40027 MB)
SCSI device sda: drive cache: write through
/dev/scsi/host1/bus0/target0/lun0: p1
Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
SCSI device sdb: 39102336 512-byte hdwr sectors (20020 MB)
SCSI device sdb: drive cache: write through
/dev/scsi/host2/bus0/target0/lun0: p1 p2 p3 p4
Attached scsi disk sdb at scsi2, channel 0, id 0, lun 0
sr0: scsi-1 drive
Uniform CD-ROM driver Revision: 3.12
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
sr1: scsi-1 drive
Attached scsi CD-ROM sr1 at scsi0, channel 0, id 1, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 5
Attached scsi generic sg1 at scsi0, channel 0, id 1, lun 0, type 5
Attached scsi generic sg2 at scsi1, channel 0, id 0, lun 0, type 0
Attached scsi generic sg3 at scsi2, channel 0, id 0, lun 0, type 0
---------------------------------------------------------


Thanks,

--

Martin Schlemmer




Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2003-07-19 19:58:23

by Jeff Garzik

[permalink] [raw]
Subject: Re: libata driver update posted

Martin Schlemmer wrote:
> On Fri, 2003-07-18 at 17:43, Jeff Garzik wrote:
>
> Slower this side. The Maxtor 40GB (ata133) is however just set to
> udma33, where the Seagate 20GB (ata100) driver is set correctly to
> udma100.

Yeah, that's expected: Parallel ATA (PATA) requires cable detection to
go beyond UDMA/33, and my driver doesn't do that yet [since I'm
concentrating on SATA].


> The Seagate start off ok (about 35mb/s), but then after doing some heavy
> disk io, it also just drops to the 20mb/s region.

That's definitely interesting. Is "heavy disk I/O" the hdparm stuff you
described, or something else too?

Jeff



2003-07-19 21:03:14

by Martin Schlemmer

[permalink] [raw]
Subject: Re: libata driver update posted

On Sat, 2003-07-19 at 22:13, Jeff Garzik wrote:
> Martin Schlemmer wrote:
> > On Fri, 2003-07-18 at 17:43, Jeff Garzik wrote:
> >
> > Slower this side. The Maxtor 40GB (ata133) is however just set to
> > udma33, where the Seagate 20GB (ata100) driver is set correctly to
> > udma100.
>
> Yeah, that's expected: Parallel ATA (PATA) requires cable detection to
> go beyond UDMA/33, and my driver doesn't do that yet [since I'm
> concentrating on SATA].
>

Ok, make sense. Nothing like the ide's 'hdx=foo' param?

>
> > The Seagate start off ok (about 35mb/s), but then after doing some heavy
> > disk io, it also just drops to the 20mb/s region.
>
> That's definitely interesting. Is "heavy disk I/O" the hdparm stuff you
> described, or something else too?
>

Nope, its unpacking, compiling and installing glibc. Sure, not _that_
extensive, but it does make it work a bit. Might be some other
weirdness, as I did not try to reproduce it more than twice.

And then something else - gnome did not want to start due to missing
icons. They are there however, and rebooting to old kernel without
libata worked fine (same kernel, just do not have the patch applied
or the normal ata driver disabled).

I will give it a go some more. Currently I am having some issues with
getting latest cvs glibc & nptl to play nice, so I will not take it too
serious for now. If anything obvious might cause it and you want me
to test, ask. Otherwise I will give it a good run in the next few
weeks and get a more complete report.


Thanks,

--

Martin Schlemmer




Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2003-07-20 02:12:10

by James Cloos

[permalink] [raw]
Subject: Re: libata driver update posted

I gave this (pulled into linus' bk current) a try on my laptop.

It has this pata chip:

00:00.0 Host bridge: Intel Corp. 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 04)
00:1f.1 IDE interface: Intel Corp. 82801BAM IDE U100 (rev 03)

aka

00:00.0 Class 0600: 8086:1130 (rev 04)
Flags: bus master, fast devsel, latency 0
Memory at e8000000 (32-bit, prefetchable) [size=64M]
00:1f.1 Class 0101: 8086:244a (rev 03)
Subsystem: 8086:4541
Flags: bus master, medium devsel, latency 0
I/O ports at bfa0 [size=16]

I left out the regualt ide support and added:

CONFIG_SCSI_ATA=y
CONFIG_SCSI_ATA_PATA=y
CONFIG_SCSI_ATA_ATAPI=y
CONFIG_SCSI_ATA_PIIX=y

The laptop has its fixed drive at hda, its fixed cd/dvd at hdb and
its media bay drive (whatever may be installed) at hdc.

root=/dev/sda3 failed to find the root fs.

I don't have anything here to plug into the serial port, so I cannot
record the boot messages.

Is my controller among the supported PIIX/ICH PATA chipsets?

-JimC

2003-07-20 02:37:14

by Jeff Garzik

[permalink] [raw]
Subject: Re: libata driver update posted

James H. Cloos Jr. wrote:
> 00:1f.1 Class 0101: 8086:244a (rev 03)
> Subsystem: 8086:4541
> Flags: bus master, medium devsel, latency 0
> I/O ports at bfa0 [size=16]
[...]
> root=/dev/sda3 failed to find the root fs.
[...]
> Is my controller among the supported PIIX/ICH PATA chipsets?


Yes, all you need to do is add another PCI id for your chipset to
drivers/scsi/ata_piix.c:

+ { 0x8086, 0x244a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix4_pata },

Once I add cable detection (PATA is currently limited to UDMA/33), this
PCI ID entry will change slightly, but the above should get you going.

Note again that ATAPI isn't supported yet...

Jeff