Skip to contentSkip to conversation

Adaptec-2920 eats too much cpu time when reading from the CD-ROM

DISCUSSION Florin Iucha 2 participants 4 messages Dec 6, 2001 SCSI

lore
Share & tools
lore
#0 lore raw

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

Signature · 3 lines
"If it's not broken, let's fix it till it is."

41A9 2BDE 8E11 F1C5 87A6  03EE 34B3 E075 3B90 DFE4
#1 lore raw
Quoted 7 lines

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.

Quoted 3 lines

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.

drivers/scsi/fdomain.h +1 -0
@@ -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, 				 \
drivers/scsi/fdomain.c +10 -1
@@ -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");
#2 lore raw
In reply to Florin Iucha
Quoted 10 lines · Alan Cox
Quoted 7 lines

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.

Signature · 3 lines
"If it's not broken, let's fix it till it is."

41A9 2BDE 8E11 F1C5 87A6  03EE 34B3 E075 3B90 DFE4
#3 lore raw
Quoted 3 lines

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.