All of lore.kernel.org
 help / color / mirror / Atom feed
* losing time -- unmaskirq question
@ 2003-10-10 15:36 Stuart_Hayes
  0 siblings, 0 replies; only message in thread
From: Stuart_Hayes @ 2003-10-10 15:36 UTC (permalink / raw)
  To: linux-ide


I have a system that loses time when running CD-ROM stress (i.e., the system
clock runs too slowly).  This CD-ROM is in the DMA blacklist, so it is
running in PIO mode, and this system has a single, non-hyperthreading CPU.
It will lose about 20 minutes in 12 hours, if I leave it running CD-ROM
stress.

I have found that the problem is that the IDE driver leaves local interrupts
disabled for the duration of the interrupt handler, which includes the data
transfer, since the drive is in PIO mode.  I've seen this take around 10ms.
Since there is only one CPU in this system, this causes timer ticks to be
lost, since local interrupts are disabled for 10ms, and there are no other
CPUs to take the interrupt.

Turning on the unmaskirq setting with "hdparm -u1 /dev/hda" (this sets the
variable drive->unmask to a non-zero value) seems to fix the problem--this
causes the IDE driver to enable local interrupts before calling the ide-cd
specific interrupt handler (which does the actual data transfer)... which
allows the timer tick interrupt to be handled in the middle of a PIO data
transfer.

I would guess that this is a problem with *any* IDE device that's running in
PIO mode on a uniprocessor system.  I can see from the code that there are
some cases where people have found problems with unmaskirq enabled, but
these sound like bugs with particular hardware, not an architectural
problem.

Does anyone know of any reason why unmaskirq (drive->unmask) should not be
set by default?

Thanks,
Stuart
stuart_hayes@dell.com


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-10 15:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-10 15:36 losing time -- unmaskirq question Stuart_Hayes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.