On Fri, 31 Mar 2000, Boris Okun wrote:
> I think the easier and faster way to do the underflow detection would be
> to
> compare offset with delay_at_last_interrupt which we save in
> timer_interrupt() ( we currently save it only if tsc is enabled so we'll
> have to move it out of if(use_tsc){} ). Then just put
>
> if (count < delay_at_last_interrupt ) count += TICK_SIZE;
Problem I see with that is that we still have a situation where a
pending timer interrupt is not recognized:
- IRQ0 ISR sets delay_at_last_interrupt based on counter.
If interrupts were not disabled when IRQ0 occurs, then
delay_at_last_interrupt is quite close to LATCH.
- Another interrupt occurs/ISR is entered/interrupts disabled
slightly before next IRQ0.
- IRQ0 occurs with interrupts disabled. IRQ0 is pending; 8254 counter
has underflowed and reset to LATCH.
- Interrupt disabled ISR code is still executing for some time after IRQ0
> time represented by (LATCH - delay_at_last_interrupt).
- do_slowgettimeoffset() is called. delay_at_last_interrupt logic
does not recognize underflow, since read value of counter is not
> delay_at_last_interrupt.
It seems that the interrupt pending bit has to be examined in order
to avoid mistakes that could arise from basing an underflow detection
solely on values of a previous read of the counter...
- Jason Sodergren / jason@taiga.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:10 EST