public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* slow latencies on IDE disk drives( controller? )
@ 2001-03-26 11:22 Uncle George
  2001-03-26 17:41 ` Andre Hedrick
  0 siblings, 1 reply; 6+ messages in thread
From: Uncle George @ 2001-03-26 11:22 UTC (permalink / raw)
  To: andre, ahedrick, andre, linux-kernel

I am processing sound data on /dev/dsp. Generally the ~61k devive buffer
is enough to keep the device satiated && gives the program time to fill
up the device buffer when there is 16k of buffer space that needs to be
filled.

But on occasion the /dev/dsp device "slurrs" ( sounds like what happens
when the speed of a tape recorder slows down due to a finger placed down
on the capstain ) unexpectedly. This was eventually traced to the usage
of an IDE disk drive. using the scsi drive does not cause the problem to
manifest itself( at least my ears say so ). but using "dd if=/dev/hda4
of=/dev/null ) does immediately cause the slurring to happen.


I think I can create a simple pgm to demo this problem, but the DATA
file that gets feed into /dev/dsp is a little large for e-mail.


/gat


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

* Re: slow latencies on IDE disk drives( controller? )
  2001-03-26 11:22 slow latencies on IDE disk drives( controller? ) Uncle George
@ 2001-03-26 17:41 ` Andre Hedrick
  2001-03-27 12:00   ` Uncle George
  0 siblings, 1 reply; 6+ messages in thread
From: Andre Hedrick @ 2001-03-26 17:41 UTC (permalink / raw)
  To: Uncle George; +Cc: linux-kernel


Hello GAT,

Can you be more specific?  I need a kernel and hardware info and generally
more info than what is given.  Is this a PIO/DMA process is it a laptop or
unsupported hardware?

On Mon, 26 Mar 2001, Uncle George wrote:

> I am processing sound data on /dev/dsp. Generally the ~61k devive buffer
> is enough to keep the device satiated && gives the program time to fill
> up the device buffer when there is 16k of buffer space that needs to be
> filled.
> 
> But on occasion the /dev/dsp device "slurrs" ( sounds like what happens
> when the speed of a tape recorder slows down due to a finger placed down
> on the capstain ) unexpectedly. This was eventually traced to the usage
> of an IDE disk drive. using the scsi drive does not cause the problem to

How did you derive this path to the ATA driver?
What is the drive, and how fast (or how slow) is it?

> manifest itself( at least my ears say so ). but using "dd if=/dev/hda4
> of=/dev/null ) does immediately cause the slurring to happen.
> 
> 
> I think I can create a simple pgm to demo this problem, but the DATA
> file that gets feed into /dev/dsp is a little large for e-mail.

The content of the barf is not important, but the process you are doing to
create this issue is.

Andre Hedrick
Linux ATA Development


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

* Re: slow latencies on IDE disk drives( controller? )
  2001-03-26 17:41 ` Andre Hedrick
@ 2001-03-27 12:00   ` Uncle George
  2001-03-27 17:06     ` Andre Hedrick
  0 siblings, 1 reply; 6+ messages in thread
From: Uncle George @ 2001-03-27 12:00 UTC (permalink / raw)
  To: Andre Hedrick; +Cc: linux-kernel, Jeremy Jackson

The system is a Compaq XP1000 ( 667Mhz Alpha processor ). The
ON-motherboard IDE controller ( there is only one ) originally just had
a cdrom attached. When I got the system I added a 30gig maxtor drive.
There is no second controller ( ergo no /dev/hdc * /dev/hdd ) builtin,
so the IDE system was probably not a main selling point of the system.
changing the parameters for the IDE disk drive does not do much in terms
if the timing tests. I'll see if it changes the 'sound effects' as soon
as i look on the motherboard for the ide controller chip.

The system specs as the Redhat/linux/6.2 with linux-2.2.14-7.0 (
floating point fixes ) /var/log/messages has:

Mar 27 06:38:08 Java kernel: rtc: Digital UNIX epoch (1952) detected
Mar 27 06:38:08 Java kernel: PCI_IDE: unknown IDE controller on PCI bus
00 device 39, VID=1080, DID=c693
Mar 27 06:38:08 Java kernel: PCI_IDE: not 100% native mode: will probe
irqs later
Mar 27 06:38:08 Java kernel:     ide0: BM-DMA at 0x1100-0x1107, BIOS
settings: hda:pio, hdb:pio
Mar 27 06:38:08 Java kernel:     ide1: BM-DMA at 0x1108-0x110f, BIOS
settings: hdc:pio, hdd:pio
Mar 27 06:38:08 Java kernel: PCI_IDE: unknown IDE controller on PCI bus
00 device 3a, VID=1080, DID=c693
Mar 27 06:38:08 Java kernel: PCI_IDE: not 100% native mode: will probe
irqs later
Mar 27 06:38:08 Java kernel: PCI_IDE: port 0x01f0 already claimed by
ide0
Mar 27 06:38:08 Java kernel: PCI_IDE: port 0x0170 already claimed by
ide1
Mar 27 06:38:08 Java kernel: PCI_IDE: neither IDE port enabled (BIOS)
Mar 27 06:38:08 Java kernel: hda: Maxtor 53073U6, ATA DISK drive
Mar 27 06:38:08 Java kernel: hdb: Compaq CRD-8322B, ATAPI CDROM drive
Mar 27 06:38:08 Java kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Mar 27 06:38:08 Java kernel: hda: Maxtor 53073U6, 29311MB w/2048kB
Cache, CHS=59554/16/63, (U)DMA
Mar 27 06:38:09 Java kernel: hdb: ATAPI 32X CD-ROM drive, 128kB Cache
Mar 27 06:38:09 Java kernel: Uniform CDROM driver Revision: 2.56
Mar 27 06:38:09 Java kernel: Floppy drive(s): fd0 is 2.88M


[root@Java gat]# /sbin/hdparm -i /dev/hda

/dev/hda:

 Model=Maxtor 53073U6, FwRev=DAC10SC0, SerialNo=K60CR35C
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
 BuffType=3(DualPortCache), BuffSize=2048kB, MaxMultSect=16,
MultSect=off
 DblWordIO=no, OldPIO=2, DMA=yes, OldDMA=0
 CurCHS=16383/16/63, CurSects=-66060037, LBA=yes, LBAsects=60030432
 tDMA={min:120,rec:120}, DMA modes: mword0 mword1 *mword2 
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, PIO modes: mode3 mode4 
 UDMA modes: mode0 mode1 mode2 mode3 mode4 

[root@Java gat]# /sbin/hdparm -t /dev/hda

/dev/hda:
 Timing buffered disk reads:  64 MB in 20.11 seconds =  3.18 MB/sec
[root@Java gat]# 

[root@Java gat]# /sbin/hdparm -u 1 -m 16 -c 1 -d 1 /dev/hda

/dev/hda:
 setting 32-bit I/O support flag to 1
 setting multcount to 16
 setting unmaskirq to 1 (on)
 setting using_dma to 1 (on)
 multcount    = 16 (on)
 I/O support  =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
[root@Java gat]# /sbin/hdparm -t /dev/hda

/dev/hda:
 Timing buffered disk reads:  64 MB in 20.05 seconds =  3.19 MB/sec
[root@Java gat]# 



Andre Hedrick wrote:
> 
> Hello GAT,
> 
> Can you be more specific?  I need a kernel and hardware info and generally
> more info than what is given.  Is this a PIO/DMA process is it a laptop or
> unsupported hardware?
> 
> On Mon, 26 Mar 2001, Uncle George wrote:
> 
> > I am processing sound data on /dev/dsp. Generally the ~61k devive buffer
> > is enough to keep the device satiated && gives the program time to fill
> > up the device buffer when there is 16k of buffer space that needs to be
> > filled.
> >
> > But on occasion the /dev/dsp device "slurrs" ( sounds like what happens
> > when the speed of a tape recorder slows down due to a finger placed down
> > on the capstain ) unexpectedly. This was eventually traced to the usage
> > of an IDE disk drive. using the scsi drive does not cause the problem to
> 
> How did you derive this path to the ATA driver?
> What is the drive, and how fast (or how slow) is it?
> 
> > manifest itself( at least my ears say so ). but using "dd if=/dev/hda4
> > of=/dev/null ) does immediately cause the slurring to happen.
> >
> >
> > I think I can create a simple pgm to demo this problem, but the DATA
> > file that gets feed into /dev/dsp is a little large for e-mail.
> 
> The content of the barf is not important, but the process you are doing to
> create this issue is.
> 
> Andre Hedrick
> Linux ATA Development


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

* Re: slow latencies on IDE disk drives( controller? )
  2001-03-27 12:00   ` Uncle George
@ 2001-03-27 17:06     ` Andre Hedrick
  2001-03-27 21:15       ` Uncle George
  0 siblings, 1 reply; 6+ messages in thread
From: Andre Hedrick @ 2001-03-27 17:06 UTC (permalink / raw)
  To: Uncle George; +Cc: linux-kernel, Jeremy Jackson


#define PCI_VENDOR_ID_CONTAQ            0x1080
#define PCI_DEVICE_ID_CONTAQ_82C599     0x0600
#define PCI_DEVICE_ID_CONTAQ_82C693     0xc693

 * linux/drivers/block/cy82c693.c       Version 0.34    Dec. 13, 1999
 *
 *  Copyright (C) 1998-99 Andreas S. Krebs (akrebs@altavista.net), Maintainer
 *  Copyright (C) 1998-99 Andre Hedrick, Integrater

 * Notes:
 * - I recently got a 16.8G IBM DTTA, so I was able to test it with
 *   a large and fast disk - the results look great, so I'd say the
 *   driver is working fine :-)
 *   hdparm -t reports 8.17 MB/sec at about 6% CPU usage for the DTTA
 * - this is my first linux driver, so there's probably a lot  of room
 *   for optimizations and bug fixing, so feel free to do it.
 * - use idebus=xx parameter to set PCI bus speed - needed to calc
 *   timings for PIO modes (default will be 40)
 * - if using PIO mode it's a good idea to set the PIO mode and
 *   32-bit I/O support (if possible), e.g. hdparm -p2 -c1 /dev/hda
 * - I had some problems with my IBM DHEA with PIO modes < 2
 *   (lost interrupts) ?????
 * - first tests with DMA look okay, they seem to work, but there is a
 *   problem with sound - the BusMaster IDE TimeOut should fixed this

This is your fix....

Andre Hedrick
Linux ATA Development
ASL Kernel Development
-----------------------------------------------------------------------------
ASL, Inc.                                     Toll free: 1-877-ASL-3535
1757 Houret Court                             Fax: 1-408-941-2071
Milpitas, CA 95035                            Web: www.aslab.com


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

* Re: slow latencies on IDE disk drives( controller? )
  2001-03-27 17:06     ` Andre Hedrick
@ 2001-03-27 21:15       ` Uncle George
  2001-03-27 21:25         ` Andre Hedrick
  0 siblings, 1 reply; 6+ messages in thread
From: Uncle George @ 2001-03-27 21:15 UTC (permalink / raw)
  To: Andre Hedrick, linux-kernel

The fix is a lot simpler. It has to be placed in release notes that the
generic ide can cause the sound device to distort the sound stream. 
Would that be a fair statement ?


Andre Hedrick wrote:
> 
>
> 
> This is your fix....
> 
> Andre Hedrick
>

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

* Re: slow latencies on IDE disk drives( controller? )
  2001-03-27 21:15       ` Uncle George
@ 2001-03-27 21:25         ` Andre Hedrick
  0 siblings, 0 replies; 6+ messages in thread
From: Andre Hedrick @ 2001-03-27 21:25 UTC (permalink / raw)
  To: Uncle George; +Cc: linux-kernel

On Tue, 27 Mar 2001, Uncle George wrote:

> The fix is a lot simpler. It has to be placed in release notes that the
> generic ide can cause the sound device to distort the sound stream. 
> Would that be a fair statement ?

GAT,

Not sure how to comment, but did enabling the chipset code make it work?
Second your case is one where the generic code can not find DMA space,
therefore you are forced into PIO, and that will place the system under an
extra load to potential produce your problem.

So the question back is does the chipset code work?
If so then a generic blurb about sound would be valid in at least two
cases and that make a good case for inclusion.

> Andre Hedrick wrote:
> > 
> >
> > 
> > This is your fix....
> > 
> > Andre Hedrick
> >
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

Andre Hedrick
Linux ATA Development
ASL Kernel Development
-----------------------------------------------------------------------------
ASL, Inc.                                     Toll free: 1-877-ASL-3535
1757 Houret Court                             Fax: 1-408-941-2071
Milpitas, CA 95035                            Web: www.aslab.com


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

end of thread, other threads:[~2001-03-27 21:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-26 11:22 slow latencies on IDE disk drives( controller? ) Uncle George
2001-03-26 17:41 ` Andre Hedrick
2001-03-27 12:00   ` Uncle George
2001-03-27 17:06     ` Andre Hedrick
2001-03-27 21:15       ` Uncle George
2001-03-27 21:25         ` Andre Hedrick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox