I have recently performed some testing on the ata and wd drivers
on my system.  When writing to and reading from a file on the same
file system in the same directory, the ata driver appears to take almost

double the CPU time as compared to the wd driver.  However, when
reading from the raw disk, the ata and wd driver take about the same
amount of CPU time.  DMA is enabled in both driver.

Can someone explain why the ata driver is using more CPU?

Rich Straka
[EMAIL PROTECTED]

*********
wd driver results writing to a file.

$ time dd if=/dev/zero of=test.dat bs=1024k count=256
256+0 records in
256+0 records out
268435456 bytes transferred in 41.810011 secs (6420363 bytes/sec)

real    0m42.136s
user    0m0.002s
sys     0m19.939s

*********
ata driver results writing to a file.

$ time dd if=/dev/zero of=test.dat bs=1024k count=256
256+0 records in
256+0 records out
268435456 bytes transferred in 39.475358 secs (6800077 bytes/sec)

real    0m39.750s
user    0m0.008s
sys     0m35.665s


********
wd driver results reading from a file.

$ time dd if=test.dat of=/dev/null bs=1024k count=256
256+0 records in
256+0 records out
268435456 bytes transferred in 39.992958 secs (6712068 bytes/sec)

real    0m40.040s
user    0m0.025s
sys     0m13.387s

********
ata driver results reading from a file.

$ time dd if=test.dat of=/dev/null bs=1024k count=256
256+0 records in
256+0 records out
268435456 bytes transferred in 37.914618 secs (7079999 bytes/sec)

real    0m37.944s
user    0m0.009s
sys     0m28.221s


********
wd results reading from raw disk.

$ time dd if=/dev/rwd0 of=/dev/null bs=1024k count=256
256+0 records in
256+0 records out
268435456 bytes transferred in 33.100446 secs (8109723 bytes/sec)

real    0m33.137s
user    0m0.000s
sys     0m0.266s

********
ata results reading from raw disk.

$ time dd if=/dev/rwd0 of=/dev/null bs=1024k count=256
256+0 records in
256+0 records out
268435456 bytes transferred in 34.518500 secs (7776568 bytes/sec)

real    0m34.535s
user    0m0.000s
sys     0m0.222s



*******************************************************
dmesg with wd driver.
*******************************************************
Copyright (c) 1992-1999 The FreeBSD Project.
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California. All rights
reserved.
FreeBSD 4.0-CURRENT #1: Sat Dec  4 09:22:58 MST 1999

Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 333189478 Hz
CPU: AMD-K6(tm) 3D processor (333.19-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x580  Stepping = 0
  Features=0x8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX>
  AMD Features=0x80000800<SYSCALL,3DNow!>
real memory  = 134152192 (131008K bytes)
avail memory = 127021056 (124044K bytes)
Preloaded elf kernel "kernel" at 0xc0303000.
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib1: <VIA 82C598MVP (Apollo MVP3) PCI-PCI (AGP) bridge> at device 1.0
on pci0
pci1: <PCI bus> on pcib1
isab0: <VIA 82C586 PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
ide_pci0: <VIA 82C586x (Apollo) Bus-master IDE controller> at device 7.1
on pci0
chip1: <VIA 82C586B ACPI interface> at device 7.3 on pci0
sym0: <875> irq 10 at device 8.0 on pci0
sym0: Symbios NVRAM, ID 7, Fast-20, parity checking
sym0: open drain IRQ line driver, using on-chip SRAM
vga-pci0: <Matrox MGA 2164W graphics accelerator> at device 9.0 on pci0
fxp0: <Intel EtherExpress Pro 10/100B Ethernet> irq 12 at device 10.0 on
pci0
fxp0: Ethernet address 00:a0:c9:27:fc:1d
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
wdc0 at port 0x1f0-0x1f7 irq 14 flags 0xa008a008 on isa0
wdc0: unit 0 (wd0): <IBM-DCAA-34330>, DMA, 32-bit, multi-block-8
wd0: 4134MB (8467200 sectors), 8400 cyls, 16 heads, 63 S/T, 512 B/S
wdc1 at port 0x170-0x177 irq 15 flags 0xa008a008 on isa0
wdc1: unit 0 (wd2): <WDC AC22500L>, DMA, 32-bit, multi-block-8
wd2: 2441MB (4999680 sectors), 4960 cyls, 16 heads, 63 S/T, 512 B/S
wdc1: unit 1 (atapi): <CD-ROM  TW 120D/V2.10>, removable, dma, iordy
wcd0: drive speed 2062KB/sec, 240KB cache
wcd0: supported read types: CD-R, CD-DA
wcd0: Audio: play, 255 volume levels
wcd0: Mechanism: ejectable tray
wcd0: Medium: no/blank disc inside, unlocked
atkbdc0: <keyboard controller (i8042)> at port 0x60-0x6f on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
vga0: <Generic ISA VGA> at port 0x3b0-0x3df iomem 0xa0000-0xbffff on
isa0
sc0: <System console> on isa0
sc0: VGA <16 virtual consoles, flags=0x200>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
sio2 at port 0x3e8-0x3ef irq 5 on isa0
sio2: type 16550A
ppc0 at port 0x378-0x37f irq 7 drq 3 on isa0
ppc0: Winbond chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/16 bytes threshold
lpt0: <generic printer> on ppbus 0
lpt0: Interrupt-driven port
ppi0: <generic parallel i/o> on ppbus 0
pcm0: <CS4236> at port 0x530-0x53f irq 11 drq 1 flags 0xa610 on isa0
Waiting 8 seconds for SCSI devices to settle
sym0: Downloading SCSI SCRIPTS.
(noperiph:sym0:0:-1:-1): SCSI bus reset delivered.
Mounting root from ufs:/dev/wd0s2a
da0 at sym0 bus 0 target 3 lun 0
da0: <QUANTUM XP32275W LXY4> Fixed Direct Access SCSI-2 device
da0: 40.000MB/s transfers (20.000MHz, offset 16, 16bit), Tagged Queueing
Enabled
da0: 2170MB (4445380 512 byte sectors: 255H 63S/T 276C)


*******************************************************
dmesg with ata driver.
*******************************************************
Copyright (c) 1992-1999 The FreeBSD Project.
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California. All rights
reserved.
FreeBSD 4.0-CURRENT #0: Wed Dec  8 22:13:02 MST 1999

Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 333189391 Hz
CPU: AMD-K6(tm) 3D processor (333.19-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x580  Stepping = 0
  Features=0x8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX>
  AMD Features=0x80000800<SYSCALL,3DNow!>
real memory  = 134152192 (131008K bytes)
avail memory = 127029248 (124052K bytes)
Preloaded elf kernel "kernel" at 0xc0301000.
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib1: <VIA 82C598MVP (Apollo MVP3) PCI-PCI (AGP) bridge> at device 1.0
on pci0
pci1: <PCI bus> on pcib1
isab0: <VIA 82C586 PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
ata-pci0: <VIA Apollo IDE controller> at device 7.1 on pci0
ata-pci0: Busmastering DMA supported
ata0 at 0x01f0 irq 14 on ata-pci0
ata1 at 0x0170 irq 15 on ata-pci0
chip1: <VIA 82C586B ACPI interface> at device 7.3 on pci0
sym0: <875> irq 10 at device 8.0 on pci0
sym0: Symbios NVRAM, ID 7, Fast-20, parity checking
sym0: open drain IRQ line driver, using on-chip SRAM
vga-pci0: <Matrox MGA 2164W graphics accelerator> at device 9.0 on pci0
fxp0: <Intel EtherExpress Pro 10/100B Ethernet> irq 12 at device 10.0 on
pci0
fxp0: Ethernet address 00:a0:c9:27:fc:1d
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <keyboard controller (i8042)> at port 0x60-0x6f on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
vga0: <Generic ISA VGA> at port 0x3b0-0x3df iomem 0xa0000-0xbffff on
isa0
sc0: <System console> on isa0
sc0: VGA <16 virtual consoles, flags=0x200>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
sio2 at port 0x3e8-0x3ef irq 5 on isa0
sio2: type 16550A
ppc0 at port 0x378-0x37f irq 7 drq 3 on isa0
ppc0: Winbond chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/16 bytes threshold
lpt0: <generic printer> on ppbus 0
lpt0: Interrupt-driven port
ppi0: <generic parallel i/o> on ppbus 0
pcm0: <CS4236> at port 0x530-0x53f irq 11 drq 1 flags 0xa610 on isa0
ad0: <IBM-DCAA-34330/CA4OA42A> ATA-3 disk at ata0 as master
ad0: 4134MB (8467200 sectors), 8400 cyls, 16 heads, 63 S/T, 512 B/S
ad0: 16 secs/int, 1 depth queue, DMA
ad1: <WDC AC22500L/24.39E26> ATA-3 disk at ata1 as master
ad1: 2441MB (4999680 sectors), 4960 cyls, 16 heads, 63 S/T, 512 B/S
ad1: 16 secs/int, 1 depth queue, DMA
acd0: <CD-ROM TW 120D/V2.10> CDROM drive at ata1 as slave
acd0: read 2062KB/s (2062KB/s), 240KB buffer, PIO
acd0: supported read types: CD-R, CD-DA
acd0: Audio: play, 255 volume levels
acd0: Mechanism: ejectable tray
acd0: Medium: no/blank disc inside, unlocked
Waiting 8 seconds for SCSI devices to settle
sym0: Downloading SCSI SCRIPTS.
(noperiph:sym0:0:-1:-1): SCSI bus reset delivered.
Mounting root from ufs:/dev/wd0s2a
da0 at sym0 bus 0 target 3 lun 0
da0: <QUANTUM XP32275W LXY4> Fixed Direct Access SCSI-2 device
da0: 40.000MB/s transfers (20.000MHz, offset 16, 16bit), Tagged Queueing
Enabled
da0: 2170MB (4445380 512 byte sectors: 255H 63S/T 276C)




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to