Subject: Re: a strange atapi <-> load problem?
To: Thorsten Frueauf <frueauf@ira.uka.de>
From: Manuel BOUYER <bouyer@antioche.lip6.fr>
List: port-i386
Date: 09/04/1997 17:56:06
On Sep 3, Thorsten Frueauf wrote
> Hello!
> 
> I am using NetBSD current (02.09.1997) on my Laptop Toshiba Tecra 500 CDT
> with the new scsipi code. Now I see a problem (which I think was not the
> case with the old atapi patches):
> 
> If I mount a cdrom (`mount -t cd9660 -o ro /dev/cd0a /mnt`) I can watch
> the load increasing to arround 1.0. If I umount it, chances are good
> that the load just drops back to 0.0 (I tested this with nothing else
> activly running). But sometimes I have to repeat some mount/umount sequences
> to get the load back to 0.0.
> 
> Strange enough, e.g. top tells me the cpu is 100% idle, and the process
> at top is either sleeping - but at least not eating anything that would
> cause a load of 1.x.
> 
> The cdrom works well btw. I can access files without any problems.
> 
> Here is what dmesg tells about the atapi stuff:
> 
> wdc0 at isa0 port 0x1f0-0x1f7 irq 14
> atapibus0 at wdc0
> wd0 at wdc0 drive 0: <TOSHIBA MK2101MAN>
> wd0: 2067MB, 4200 cyl, 16 head, 63 sec, 512 bytes/sec
> wd0: using 16-sector 16-bit pio transfers, lba addressing
> wdc1 at isa0 port 0x170-0x177 irq 15
> atapibus1 at wdc1
> cd0 at atapibus1 drive 0: <TOSHIBA CD-ROM XM-1402B, 7510115238, 0186> type 5 cdrom removable
> 
> 
> Any hints on whats going wrong?
> PS: Even `eject cd0` is sufficient to get that effect.... really strange :-/

I really don't know what's going wrong here. I don't get that on my system.
Does also the machine feels loaded ?
Could be a loop calling wdcwait() (in which case this is a busy wait, so
the machine should feel loaded) or spurious interrupts. You could try 
to enable the "printf("wdcintr: inactive controller, "" lines in wdcintr(),
and also "printf ("wdcintr: clearing up %d bytes\n", len);",and sees whats
going here. If this doesn't help, try adding a printf at the beginig of
wdcwait().

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--