From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <73be83bd136788aba0032091048dc74d.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199802181017.LAA21322@gueuze.ens-lyon.fr> Date: Wed, 18 Feb 1998 11:17:39 +0100 (MET) From: Loic Prylli Subject: SCSI bus/disk problem? - slow disk In-Reply-To: <34EA590E.E633AE15@psychology.adelaide.edu.au> Mark Brown writes: > However the scsi disk is extemely slow (4.1GB Quantum UW with Qlogic > (PCI) controller). A process sits around for ages apparently waiting > for the disk to respond - there is no load on the system. > eg to dd a 100MB file to /dev/null takes <2 secs process time but > about 135 secs real time!! The same operation on the same box with > Digital Unix took <10secs real time (and about 1 sec total process > time). I had this problem some time ago, the problem is that the irq of the scsi controller is not detected correctly by the linux kernel. It binds it to irq 0, the only very strange thing is that it works at all!! (maybe irq0 is the timer interrupt, so the scsi interrupt handler is called at each tick instead of as soon as an scsi request is completed, that could explain the slowness). Here is what I have understood (for 2.0.3x, I have not looked at 2.1.x): The PWS have two PCI bus on motherboard, the SCSI controller is on the second one, there is code in bios32.c to find the number of the interrupt depending on a "global slot number", computed in function of the PCI slot number, and the PCI bus of the device. For device on the second PCI bus you have to add 5 to the PCI slot number to find the "global slot number". To differentiate between devices on the second PCI bus and PCI bus behind other add-on bridge that could have been added, the comparison PCI_SLOT(dev->bus->self->devfn) == 8 is hardcoded in the code, which assume the PCI bridge is on PCI slot 8. Perhaps on previous PWS it was true, but on mine and probably on yours, the bridge is in PCI slot 20 (as reported by /proc/pci): Bus 0, device 20, function 0: PCI bridge: DEC DC21052 (rev 2). So I have change the code to determine if a device is on the second PCI bus. Here is the small patch that should solve your problem: --- linux/arch/alpha/kernel/bios32.c.std Sun Jan 18 12:10:59 1998 +++ linux/arch/alpha/kernel/bios32.c Sun Jan 18 12:10:59 1998 @@ -756,7 +756,7 @@ /* follow the chain of bridges, swizzling as we go */ #if defined(CONFIG_ALPHA_MIATA) /* check first for the built-in bridge */ - if (PCI_SLOT(dev->bus->self->devfn) == 8) { + if ( PCI_SLOT(dev->bus->self->devfn) == 20 || PCI_SLOT(dev->bus->self->devfn) == 8) { slot = PCI_SLOT(dev->devfn) + 5; #if 0 printk("MIATA: bus 1 slot %d pin %d irq %d " Best regards, Loic -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com