* Time slowing down while doing IDE PIO transfer
@ 2006-01-20 17:26 Maxime Bizon
2006-01-20 18:15 ` Alan Cox
2006-01-21 11:20 ` Ralf Baechle
0 siblings, 2 replies; 4+ messages in thread
From: Maxime Bizon @ 2006-01-20 17:26 UTC (permalink / raw)
To: linux-mips
Hello all,
I have a R4Kec board with an IDE controller, and run linux-mips 2.6.14
on it. When running a transfer on a cdrom drive, with dma disabled and
at lowest pio mode, time is slowing down (about 10 times too slow).
HZ is 1000, I'm using generic mips timer code (arch/mips/kernel/time.c),
HPT and timer interrupts are R4K.
This is I guess related to the interrupts being disabled during pio
transfer (I can't use unmaskirq btw).
Looking at timer_interrupt() code, I see that do_timer() will be only
called once, whether we have lost timer interrupts or not, I guess this
is the reason of this time problem. Is it a wanted behaviour ?
If this is the case, I guess my only hope is running with lower HZ or
using an RTC ?
Thanks,
--
Maxime
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Time slowing down while doing IDE PIO transfer
2006-01-20 17:26 Time slowing down while doing IDE PIO transfer Maxime Bizon
@ 2006-01-20 18:15 ` Alan Cox
2006-01-20 18:32 ` Maxime Bizon
2006-01-21 11:20 ` Ralf Baechle
1 sibling, 1 reply; 4+ messages in thread
From: Alan Cox @ 2006-01-20 18:15 UTC (permalink / raw)
To: Maxime Bizon; +Cc: linux-mips
On Gwe, 2006-01-20 at 18:26 +0100, Maxime Bizon wrote:
> This is I guess related to the interrupts being disabled during pio
> transfer (I can't use unmaskirq btw).
Silly question - but why not ?
Alan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Time slowing down while doing IDE PIO transfer
2006-01-20 18:15 ` Alan Cox
@ 2006-01-20 18:32 ` Maxime Bizon
0 siblings, 0 replies; 4+ messages in thread
From: Maxime Bizon @ 2006-01-20 18:32 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-mips
On Fri, 2006-01-20 at 18:15 +0000, Alan Cox wrote:
> > This is I guess related to the interrupts being disabled during pio
> > transfer (I can't use unmaskirq btw).
> Silly question - but why not ?
It just doesn't work :)
Transfers stall and here is the kind of message I get:
hdb: lost interrupt
hdb: status error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hdb: drive not ready for command
hdb: status timeout: status=0xd0 { Busy }
ide: failed opcode was: unknown
hdb: drive not ready for command
--
Maxime
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Time slowing down while doing IDE PIO transfer
2006-01-20 17:26 Time slowing down while doing IDE PIO transfer Maxime Bizon
2006-01-20 18:15 ` Alan Cox
@ 2006-01-21 11:20 ` Ralf Baechle
1 sibling, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2006-01-21 11:20 UTC (permalink / raw)
To: Maxime Bizon; +Cc: linux-mips
On Fri, Jan 20, 2006 at 06:26:37PM +0100, Maxime Bizon wrote:
> I have a R4Kec board with an IDE controller, and run linux-mips 2.6.14
> on it. When running a transfer on a cdrom drive, with dma disabled and
> at lowest pio mode, time is slowing down (about 10 times too slow).
>
> HZ is 1000, I'm using generic mips timer code (arch/mips/kernel/time.c),
> HPT and timer interrupts are R4K.
>
> This is I guess related to the interrupts being disabled during pio
> transfer (I can't use unmaskirq btw).
This by itself sounds like a bug.
> Looking at timer_interrupt() code, I see that do_timer() will be only
> called once, whether we have lost timer interrupts or not, I guess this
> is the reason of this time problem. Is it a wanted behaviour ?
"Yes" - because properly designed systems shouldn't loose interrupts.
Your problem isn't new but so for everybody was able to solve it by
unmasking interrupts.
> If this is the case, I guess my only hope is running with lower HZ or
> using an RTC ?
Dependig on your processor's clock a lower HZ may indeed be a good idea
just to keep the interrupt overhead down. You should test yourself what
the optimal balance between latency and overhead it.
If lowering HZ doesn't solve the clock problem you may want to add a
loop to call the timer interrupt repeatedly.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-01-23 12:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-20 17:26 Time slowing down while doing IDE PIO transfer Maxime Bizon
2006-01-20 18:15 ` Alan Cox
2006-01-20 18:32 ` Maxime Bizon
2006-01-21 11:20 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox