linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* via82cxxx, DMA and performance problem
@ 2003-12-02 15:34 shal
  2003-12-02 19:23 ` Bartlomiej Zolnierkiewicz
  2004-03-20  5:49 ` xavier
  0 siblings, 2 replies; 4+ messages in thread
From: shal @ 2003-12-02 15:34 UTC (permalink / raw)
  To: linux-kernel

Hello,

I have a MSI KT3 Ultra2 mother card with the VT82C586 IDE interface.

I have a question about IDE performance.


On the 2.6.0-test10-mm1, I have this :
# lsmod
Module                  Size  Used by
eagle_usb             113280  0

# hdparm /dev/hda
/dev/hda:
  multcount    = 16 (on)
  IO_support   =  0 (default 16-bit)
  unmaskirq    =  0 (off)
  using_dma    =  0 (off)
  keepsettings =  0 (off)
  readonly     =  0 (off)
  readahead    = 256 (on)
  geometry     = 65535/16/63, sectors = 78177792, start = 0

# hdparm -tT /dev/hda
/dev/hda:
  Timing buffer-cache reads:   920 MB in  2.01 seconds = 458.24 MB/sec
  Timing buffered disk reads:   22 MB in  3.05 seconds =   7.21 MB/sec

I do :
# modprobe via82cxxx

Now I have:

# hdparm -tT /dev/hda
/dev/hda:
  Timing buffer-cache reads:   744 MB in  2.00 seconds = 371.87 MB/sec
  Timing buffered disk reads:   20 MB in  3.06 seconds =   6.54 MB/sec

I active DMA:
# hdparm -d 1 /dev/hda
/dev/hda:
  setting using_dma to 1 (on)
  using_dma    =  1 (on)


And do a sync , the sync take one minute !!!!
When I active DMA, during one minute the disk freeze (sync or other 
program)!!

After the freeze, this work but no amelioration :
# hdparm -tT /dev/hda
/dev/hda:
  Timing buffer-cache reads:   940 MB in  2.01 seconds = 467.97 MB/sec
  Timing buffered disk reads:   20 MB in  3.05 seconds =   6.56 MB/sec


kernel message:
VP_IDE: IDE controller at PCI slot 0000:00:11.1
ACPI: No IRQ known for interrupt pin A of device 0000:00:11.1 - using 
IRQ 255
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci0000:00:11.1
     ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:DMA
     ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:pio
ide0: I/O resource 0x3F6-0x3F6 not free.
hda: ERROR, PORTS ALREADY IN USE
hdb: ERROR, PORTS ALREADY IN USE
register_blkdev: cannot get major 3 for ide0
ide1: I/O resource 0x376-0x376 not free.
hdc: ERROR, PORTS ALREADY IN USE
register_blkdev: cannot get major 22 for ide1
Module via82cxxx cannot be unloaded due to unsafe usage in 
include/linux/module.h:483
blk: queue cf5cabf8, I/O limit 4095Mb (mask 0xffffffff)
hda: dma_timer_expiry: dma status == 0x61
hda: DMA timeout error
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }









Information :

# lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo 
KT266/A/333 AGP]
00:05.0 Multimedia video controller: Brooktree Corporation Bt878 Video 
Capture (rev 11)
00:05.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture 
(rev 11)
00:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. 
RTL-8139/8139C/8139C+ (rev 10)
00:07.0 SCSI storage controller: LSI Logic / Symbios Logic 53c810 (rev 23)
00:08.0 Multimedia audio controller: Ensoniq 5880 AudioPCI (rev 02)
00:0a.0 VGA compatible controller: 3Dfx Interactive, Inc. Voodoo Banshee 
(rev 03)
00:10.0 USB Controller: VIA Technologies, Inc. USB (rev 80)
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc. VT82C586/B/686A/B PIPC Bus 
Master IDE (rev 06)


ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
hda: MAXTOR 6L040J2, ATA DISK drive
hdb: Maxtor 83240D3, ATA DISK drive
hdc: CRD-8322B, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 78177792 sectors (40027 MB) w/1819KiB Cache, CHS=65535/16/63
  hda: hda1 hda2 < hda5 hda6 hda7 hda8 > hda3
hdb: max request size: 128KiB
hdb: 6329388 sectors (3240 MB) w/256KiB Cache, CHS=6697/15/63
  hdb: hdb1 hdb2
hdc: ATAPI 32X CD-ROM drive, 128kB Cache
Uniform CD-ROM driver Revision: 3.12



Another with the small hard drive (4G only):

# hdparm -tT /dev/hdb
/dev/hdb:
  Timing buffer-cache reads:   968 MB in  2.00 seconds = 483.83 MB/sec
  Timing buffered disk reads:   20 MB in  3.11 seconds =   6.43 MB/sec

root@shal:~# hdparm -d 1 /dev/hdb
/dev/hdb:
  setting using_dma to 1 (on)
  using_dma    =  1 (on)

root@shal:~# hdparm -tT /dev/hdb
/dev/hdb:
  Timing buffer-cache reads:   968 MB in  2.00 seconds = 483.35 MB/sec
  Timing buffered disk reads:   34 MB in  3.09 seconds =  11.00 MB/sec

The small hard drive is more speed than the big hard drive !!


On a normal Linux 2.4 (non ac tree) I can't use the via82cxxx without 
problem (DMA interrupt lost during boot).
If the Alan Cox kernel (2.4.22-ac4) it work fine.
Performance are 2MBit/sec without module and 6MBit/sec with module.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: via82cxxx, DMA and performance problem
  2003-12-02 15:34 via82cxxx, DMA and performance problem shal
@ 2003-12-02 19:23 ` Bartlomiej Zolnierkiewicz
  2003-12-03  2:07   ` shal
  2004-03-20  5:49 ` xavier
  1 sibling, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2003-12-02 19:23 UTC (permalink / raw)
  To: shal; +Cc: linux-kernel


Hi,

You trying to load VIA IDE chipset driver but your IDE devices
are already handled by generic IDE driver, thus you can't enable DMA.

Changing host drivers on the fly is unsupported.

If you want to use IDE chipset modules you should use IDE as module.

--bart

> kernel message:
> VP_IDE: IDE controller at PCI slot 0000:00:11.1
> ACPI: No IRQ known for interrupt pin A of device 0000:00:11.1 - using
> IRQ 255
> VP_IDE: chipset revision 6
> VP_IDE: not 100% native mode: will probe irqs later
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci0000:00:11.1
>      ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:DMA
>      ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:pio
> ide0: I/O resource 0x3F6-0x3F6 not free.
> hda: ERROR, PORTS ALREADY IN USE
> hdb: ERROR, PORTS ALREADY IN USE
> register_blkdev: cannot get major 3 for ide0
> ide1: I/O resource 0x376-0x376 not free.
> hdc: ERROR, PORTS ALREADY IN USE
> register_blkdev: cannot get major 22 for ide1
> Module via82cxxx cannot be unloaded due to unsafe usage in
> include/linux/module.h:483


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: via82cxxx, DMA and performance problem
  2003-12-02 19:23 ` Bartlomiej Zolnierkiewicz
@ 2003-12-03  2:07   ` shal
  0 siblings, 0 replies; 4+ messages in thread
From: shal @ 2003-12-03  2:07 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel

Bartlomiej Zolnierkiewicz wrote:
> Hi,
> 
> You trying to load VIA IDE chipset driver but your IDE devices
> are already handled by generic IDE driver, thus you can't enable DMA.
> 
> Changing host drivers on the fly is unsupported.
> 
> If you want to use IDE chipset modules you should use IDE as module.

Ok thank you for your response.

I have included in the kernel the via82cxxx support.

Now when I boot , it was very slow and I have this :

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 0000:00:11.1
ACPI: No IRQ known for interrupt pin A of device 0000:00:11.1 - using 
IRQ 255
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci0000:00:11.1
     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: MAXTOR 6L040J2, ATA DISK drive
hdb: Maxtor 83240D3, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: CRD-8322B, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 78177792 sectors (40027 MB) w/1819KiB Cache, CHS=65535/16/63, UDMA(133)
  hda:<4>hda: dma_timer_expiry: dma status == 0x61
hda: DMA timeout error
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }

  hda1 hda2 <<4>hda: dma_timer_expiry: dma status == 0x61
hda: DMA timeout error
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }

  hda5<4>hda: dma_timer_expiry: dma status == 0x61
hda: DMA timeout error
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }

  hda6 hda7<4>hda: dma_timer_expiry: dma status == 0x61
hda: DMA timeout error
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }

  hda8 > hda3
hdb: max request size: 128KiB
hdb: 6329388 sectors (3240 MB) w/256KiB Cache, CHS=6697/15/63, UDMA(33)
  hdb: hdb1 hdb2
hdc: ATAPI 32X CD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12


Each dma_timer_expiry is long.


I have this at boot :
# hdparm /dev/hda
/dev/hda:
  multcount    = 16 (on)
  IO_support   =  1 (32-bit)
  unmaskirq    =  1 (on)
  using_dma    =  0 (off)
  keepsettings =  0 (off)
  readonly     =  0 (off)
  readahead    = 256 (on)
  geometry     = 65535/16/63, sectors = 78177792, start = 0
# hdparm -tT /dev/hda
/dev/hda:
  Timing buffer-cache reads:   924 MB in  2.01 seconds = 460.46 MB/sec
  Timing buffered disk reads:   20 MB in  3.08 seconds =   6.50 MB/sec



When active dma the disk access freeze during a long time and I have 
this error :
hda: dma_timer_expiry: dma status == 0x61
hda: DMA timeout error
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }

and the performance is the same :
# hdparm -tT /dev/hda
/dev/hda:
  Timing buffer-cache reads:   948 MB in  2.01 seconds = 472.42 MB/sec
  Timing buffered disk reads:   20 MB in  3.08 seconds =   6.50 MB/sec


This is a part of my .config:
#
# IDE chipset support/bugfixes
#
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_IDEPNP is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_GENERIC is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
# CONFIG_IDEDMA_PCI_WIP is not set
CONFIG_BLK_DEV_ADMA=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_SC1200 is not set
CONFIG_BLK_DEV_PIIX=y
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
CONFIG_BLK_DEV_VIA82CXXX=y
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_DMA_NONPCI is not set
# CONFIG_BLK_DEV_HD is not set















^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: via82cxxx, DMA and performance problem
  2003-12-02 15:34 via82cxxx, DMA and performance problem shal
  2003-12-02 19:23 ` Bartlomiej Zolnierkiewicz
@ 2004-03-20  5:49 ` xavier
  1 sibling, 0 replies; 4+ messages in thread
From: xavier @ 2004-03-20  5:49 UTC (permalink / raw)
  To: linux-kernel

On Tue, Dec 02, 2003 at 03:34:12PM +0000, shal wrote:
|Hello,
|
|I have a MSI KT3 Ultra2 mother card with the VT82C586 IDE interface.
|
|I have a question about IDE performance.
|


Hi, I've the MSI 6380, with the kt266A chipset,
VP_IDE: VIA vt8233 (rev 00) IDE UDMA100 controller on pci0000:00:11.1

and i got dma working on the first ide controler but not on the second...

if i plug the cable and both devices on ide0 (hda : burner , hdb : disk),
 every thing works fine (udma5 for the disk), and on ide1 everything
breaks with 

hdd: dma_timer_expiry: dma status == 0x60
hdd: DMA timeout retry
hdd: timeout waiting for DMA


I tried kernels 2.4.24, and 2.6.3, sources from debian,
compiled myself, all included (ide chipset, dma...)

any clues what might be wrong ?

thanks



00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP]
00:05.0 FireWire (IEEE 1394): NEC Corporation: Unknown device 00f2 (rev 01)
00:06.0 SCSI storage controller: LSI Logic / Symbios Logic 53c875 (rev 03)
00:08.0 VGA compatible controller: S3 Inc. ViRGE/DX or /GX (rev 01)
00:09.0 Ethernet controller: Lite-On Communications Inc LNE100TX (rev 20)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8233 PCI to ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06)
00:11.2 USB Controller: VIA Technologies, Inc. USB (rev 1b)
00:11.3 USB Controller: VIA Technologies, Inc. USB (rev 1b)
00:11.4 USB Controller: VIA Technologies, Inc. USB (rev 1b)
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235 AC97 Audio Controller (rev 10)
01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G400 AGP (rev 04)



Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 0000:00:11.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt8233 (rev 00) IDE UDMA100 controller on pci0000:00:11.1
    ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:DMA
hda: PLEXTOR CD-R PX-W4824A, ATAPI CD/DVD-ROM drive
hdb: WDC WD1200JB-34EVA0, ATA DISK drive
hdc: Pioneer DVD-ROM ATAPIModel DVD-117 0107, ATAPI CD/DVD-ROM drive
hdd: IBM-DTTA-350840, ATA DISK drive
Using anticipatory io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hdb: max request size: 1024KiB
hdb: 234441648 sectors (120034 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100)
 /dev/ide/host0/bus0/target1/lun0: p1
hdd: max request size: 128KiB
hdd: 16514064 sectors (8455 MB) w/467KiB Cache, CHS=16383/16/63, UDMA(33)
 /dev/ide/host0/bus1/target1/lun0:<4>hdd: dma_timer_expiry: dma status == 0x60
hdd: DMA timeout retry
hdd: timeout waiting for DMA
 p1
hda: ATAPI 40X CD-ROM CD-R/RW CD-MRW drive, 4096kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
hdc: ATAPI 40X DVD-ROM drive, 256kB Cache, UDMA(66)


root@albert> hdparm -d1 /dev/hdd                                             0:47:33~

/dev/hdd:
 setting using_dma to 1 (on)
 using_dma    =  1 (on)
root@albert> hdparm /dev/hdd                                                 0:47:43~

/dev/hdd:
 multcount    = 16 (on)
 IO_support   =  3 (32-bit w/sync)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  0 (off)
 geometry     = 16383/16/63, sectors = 16514064, start = 0
root@albert> hdparm -t /dev/hdd                                              0:48:01~

/dev/hdd:
 Timing buffered disk reads:    2 MB in 20.39 seconds = 100.45 kB/sec

Mar 20 00:48:27 albert kernel: hdd: dma_timer_expiry: dma status == 0x40
Mar 20 00:48:27 albert kernel: hdd: DMA timeout retry
Mar 20 00:48:27 albert kernel: hdd: timeout waiting for DMA


-- 
xavier

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-20  5:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-02 15:34 via82cxxx, DMA and performance problem shal
2003-12-02 19:23 ` Bartlomiej Zolnierkiewicz
2003-12-03  2:07   ` shal
2004-03-20  5:49 ` xavier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).