2003-06-01 18:14:43

by Agustín Herrera

[permalink] [raw]
Subject: Problems with scsi emulation

I'm using a customized 2.4.20 kernel (red hat 9) with scsi emulation, scsi
cdrom & scsi generic support options enabled in .config and hdx-ide-scsi in
lilo.conf.
apps as cdrecord or cdrdao take up all my cpu time (I have a duron 1.1 gz,
kt133, 192mb sdram, 30 gb 5400 rpm hd).
in windows (with dma enabled) Nero doesn't take up any (or almost) cpu
time...
is this an issue of the linux-kernel or a configuration problem?

_________________________________________________________________
Charla con tus amigos en l?nea mediante MSN Messenger:
http://messenger.yupimsn.com/


2003-06-02 04:42:45

by Douglas Gilbert

[permalink] [raw]
Subject: Re: Problems with scsi emulation

> I'm using a customized 2.4.20 kernel (red hat 9) with
> scsi emulation, scsi cdrom & scsi generic support
> options enabled in .config and hdx-ide-scsi in
> lilo.conf. apps as cdrecord or cdrdao take up all my
> cpu time (I have a duron 1.1 gz, kt133, 192mb sdram,
> 30 gb 5400 rpm hd). in windows (with dma enabled) Nero d
> oesn't take up any (or almost) cpu time...
> is this an issue of the linux-kernel or a configuration
> problem?

Due to many problems with DMA locking up on ATAPI writers
earlier in the lk 2.4 series, Linux takes a very
conservative approach and turns off DMA.
It can be turned back on with:
# hdparm -d 1 /dev/hdb
assuming your cdwriter is found at /dev/hdb (even
though the ide-scsi driver "owns" that device
and you address it as /dev/scd0 ). You can get
faster DMA modes with the addition of the "-X"
switch in hdparm but that should not be necessary.

Doug Gilbert

2003-06-02 14:04:09

by Agustín Herrera

[permalink] [raw]
Subject: Re: Problems with scsi emulation


> > I'm using a customized 2.4.20 kernel (red hat 9) with
> > scsi emulation, scsi cdrom & scsi generic support
> > options enabled in .config and hdx-ide-scsi in
> > lilo.conf. apps as cdrecord or cdrdao take up all my
> > cpu time (I have a duron 1.1 gz, kt133, 192mb sdram,
> > 30 gb 5400 rpm hd). in windows (with dma enabled) Nero d
> > oesn't take up any (or almost) cpu time...
> > is this an issue of the linux-kernel or a configuration
> > problem?
>
> Due to many problems with DMA locking up on ATAPI writers
> earlier in the lk 2.4 series, Linux takes a very
> conservative approach and turns off DMA.
> It can be turned back on with:
> # hdparm -d 1 /dev/hdb
> assuming your cdwriter is found at /dev/hdb (even
> though the ide-scsi driver "owns" that device
> and you address it as /dev/scd0 ). You can get
> faster DMA modes with the addition of the "-X"
> switch in hdparm but that should not be necessary.
>
Doug:

I've tried that, but it doesn't make any difference.

I've been able to do ficticious tweaks on /dev/hdc and hdd like, for
example, activating dma mode 5 -which is virually impossible for a
cdrom drive. Actually, as I'd disabled ide/atapi-cdrom support in the
kernel I guess that /dev/hdc & hdd point to 'nowhere'. Anyway, with
hdparm optimizations or without them processor time consumption remains
at a 70 - 90 % so, clearly, I haven't made any progress.

The only interface for cdrom drives that i've enabled in the kernel is
scsi (to be able to record and rip w/ cdrdao). I guess that the
inability to use dma is related to that because my ide hard disks seem
to be using it w/o problems (and obviously I'm not using scsi with
them). Nevertheless, I can't set up a multcount higher than 8, which is
really surprising because the ide chipset and the drives are quite new.

So I repeat my enquiry, Is all this a question configuration or of a
kernel upgrade? I've already tried the latter, but, as far as I could
appreciate, the current nvidia 'accelerated' drivers (1.0-4363) for my
geforce2 didn't work with the 2.5 kernel (more precisely 2.5.69) I'd
compiled. Once more, is this incompatibility a current issue of these
kernels? In case it were an configuration error I would certainly do
the upgrade because 2.5 kernel series seem to have many advantages, as
for example, the inclusion of the alsa sound drivers.

Agust?n Herrera

PD: I've changed my adress to [email protected]

2003-06-06 04:04:43

by Jonathan Woithe

[permalink] [raw]
Subject: Re: Problems with scsi emulation

Doug Gilbert wrote:
> Due to many problems with DMA locking up on ATAPI writers
> earlier in the lk 2.4 series, Linux takes a very
> conservative approach and turns off DMA.

Really? That doesn't seem to be the case with my ATAPI CD writer under stock
2.4.20. At the start of this year I found that DMA was turned on by default
for my writer AND that having DMA turned on was usually fatal for burning (a
kernel oops would occur). For reference an earlier posting of mine to lkml:
http://www.ussg.iu.edu/hypermail/linux/kernel/0303.1/0384.html

> It can be turned back on with:
> # hdparm -d 1 /dev/hdb

I found that to ensure a reliable CD writing, I had to manually turn DMA OFF
under stock 2.4.20 just to get reliable writing. If I have DMA on I can
almost guarantee a kernel oops before the CD is complete under 2.4.20.

Given that the original correspondant was using Redhat 9.0, I'm guessing
that the advise about turning DMA back on refers to the Redhat
custom kernel in Redhat 9.0 as opposed to stock 2.4.20. In my experience
DMA just doesn't work in stock 2.4.20 for what it's worth.

Regards
jonathan
--
* Jonathan Woithe [email protected] *
* http://www.physics.adelaide.edu.au/~jwoithe *
***-----------------------------------------------------------------------***
** "Time is an illusion; lunchtime doubly so" **
* "...you wouldn't recognize a subtle plan if it painted itself purple and *
* danced naked on a harpsichord singing 'subtle plans are here again'" *