2001-12-06 03:02:10

by Florin Iucha

[permalink] [raw]
Subject: Adaptec-2920 eats too much cpu time when reading from the CD-ROM

Hello,

I have recently purchased a Plextor 12x CD-RW and I have attached it to
and Adaptec-2920 SCSI card. The card uses the "Future Domain Corp. TMC-18C30
[36C70]" chip.

The problem I see: when reading from the CD-RW my system becomes very
unresponsive and top reveals 90-95% of the time is spent on "system".
My CPU is AMD K6-III/500MHz with 256 Mb RAM.

When reading the same CD using the IDE DVD-ROM the time spent in system
is 5%. Also when the CD-RW is connected to the Advansys SCSI controller
the CPU usage is also negligible. The Adaptec-2920 uses IRQ 10 and does
not share it with any other board.

I notice an unusual number of interrupts in /proc/interrupts: after the
machine has been up for a couple of hours and I have written three CDs,
the statistics are:
CPU0
0: 638458 XT-PIC timer
1: 15325 XT-PIC keyboard
2: 0 XT-PIC cascade
5: 0 XT-PIC es1371
8: 1 XT-PIC rtc
9: 17004 XT-PIC usb-uhci
10: 3032143 XT-PIC fdomain
11: 58021 XT-PIC advansys
12: 2995779 XT-PIC eth0
14: 107542 XT-PIC ide0
15: 6895 XT-PIC ide1

When loading the fdomain module I get:
scsi1: <fdomain> No BIOS; using scsi id 7
scsi1: <fdomain> TMC-36C70 (PCI bus) chip at 0xdc00 irq 10
Bad boy: fdomain (at 0xd08b7866) called us without a dev_id!

Is there anything I can try?

Thanks,
florin

--

"If it's not broken, let's fix it till it is."

41A9 2BDE 8E11 F1C5 87A6 03EE 34B3 E075 3B90 DFE4


2001-12-06 09:19:41

by Alan

[permalink] [raw]
Subject: Re: Adaptec-2920 eats too much cpu time when reading from the CD-ROM

> I have recently purchased a Plextor 12x CD-RW and I have attached it to
> and Adaptec-2920 SCSI card. The card uses the "Future Domain Corp. TMC-18C30
> [36C70]" chip.
>
> The problem I see: when reading from the CD-RW my system becomes very
> unresponsive and top reveals 90-95% of the time is spent on "system".
> My CPU is AMD K6-III/500MHz with 256 Mb RAM.

I'd expect that. The 2920 is pretty old. It has no DMA channel and several
processes it must perform are polled not interrupt driven.

> scsi1: <fdomain> No BIOS; using scsi id 7
> scsi1: <fdomain> TMC-36C70 (PCI bus) chip at 0xdc00 irq 10
> Bad boy: fdomain (at 0xd08b7866) called us without a dev_id!

The Bad boy: line is fixable tho.. This should do it - let me know if it
makes that one go away.

--- linux.gamma/drivers/scsi/fdomain.h Sat Nov 17 20:47:53 2001
+++ linux.ac/drivers/scsi/fdomain.h Thu Dec 6 10:14:51 2001
@@ -43,6 +43,7 @@
abort: fdomain_16x0_abort, \
reset: fdomain_16x0_reset, \
bios_param: fdomain_16x0_biosparam, \
+ release: fdomain_16x0_release, \
can_queue: 1, \
this_id: 6, \
sg_tablesize: 64, \
--- linux.gamma/drivers/scsi/fdomain.c Sat Nov 17 20:47:53 2001
+++ linux.ac/drivers/scsi/fdomain.c Thu Dec 6 10:15:08 2001
@@ -983,7 +983,7 @@
/* Register the IRQ with the kernel */

retcode = request_irq( interrupt_level,
- do_fdomain_16x0_intr, pdev?SA_SHIRQ:0, "fdomain", NULL);
+ do_fdomain_16x0_intr, pdev?SA_SHIRQ:0, "fdomain", shpnt);

if (retcode < 0) {
if (retcode == -EINVAL) {
@@ -2033,6 +2033,15 @@
}

return 0;
+}
+
+int fdomain_16x0_release(struct Scsi_Host *shpnt)
+{
+ if (shpnt->irq)
+ free_irq(shpnt->irq, shpnt);
+ if (shpnt->io_port && shpnt->n_io_port)
+ release_region(shpnt->io_port, shpnt->n_io_port);
+
}

MODULE_LICENSE("GPL");

2001-12-06 13:51:48

by Florin Iucha

[permalink] [raw]
Subject: Re: Adaptec-2920 eats too much cpu time when reading from the CD-ROM

On Thu, Dec 06, 2001 at 09:28:08AM +0000, Alan Cox wrote:
> > I have recently purchased a Plextor 12x CD-RW and I have attached it to
> > and Adaptec-2920 SCSI card. The card uses the "Future Domain Corp. TMC-18C30
> > [36C70]" chip.
> >
> > The problem I see: when reading from the CD-RW my system becomes very
> > unresponsive and top reveals 90-95% of the time is spent on "system".
> > My CPU is AMD K6-III/500MHz with 256 Mb RAM.
>
> I'd expect that. The 2920 is pretty old. It has no DMA channel and several
> processes it must perform are polled not interrupt driven.

There is one interesting thing about it: when I write a CD, I write at 12x
- that means 1800Kb/s, which is comparable with the reading speed of 2400Kb/s.
But when writing, the system CPU usage is about 30%.

What could make the controller eat so much time when reading but not when
writing?

Thanks,
florin

PS. The patch fixes the "bad boy" message.

--

"If it's not broken, let's fix it till it is."

41A9 2BDE 8E11 F1C5 87A6 03EE 34B3 E075 3B90 DFE4

2001-12-06 14:03:09

by Alan

[permalink] [raw]
Subject: Re: Adaptec-2920 eats too much cpu time when reading from the CD-ROM

> There is one interesting thing about it: when I write a CD, I write at 12x
> - that means 1800Kb/s, which is comparable with the reading speed of 2400Kb/s.
> But when writing, the system CPU usage is about 30%.

When you write the scsi layer keeps getting to the point where there are
no commands to issue. When you read its always there waiting for the drive.