Re: RCU question

From: George Anzinger
Date: Sat Dec 11 2004 - 11:53:32 EST


Manfred Spraul wrote:
Zwane Mwaikambo wrote:

On Fri, 10 Dec 2004, George Anzinger wrote:



That is ok. Either we have interrupts off and no softirqs are pending and we
proceed to the "hlt" (where the interrupt will be taken), or softirqs are
pending, we turn interrupts on, do the softirq, turn interrupts off and try
again. Unless some tasklet (RCU?) never "gives up" or we will exit the while
with interrupts off and move on to the "hlt". Or did I miss something?


But the point is that you cannot execute hlt with interrupts disabled.


The trick is the sti instruction: It enables interrupt processing after the following instruction.

Thus
sti
hlt

cannot race - it atomically enables interrupts and waits.

Exactly :)

--
George Anzinger george@xxxxxxxxxx
High-res-timers: http://sourceforge.net/projects/high-res-timers/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/