Re: RCU question
From: George Anzinger
Date: Fri Dec 10 2004 - 14:44:23 EST
Dipankar Sarma wrote:
On Thu, Dec 09, 2004 at 03:59:45PM -0800, George Anzinger wrote:
I am working on VST code. This code is called from the idle loop to check
for future timers. It then sets up a timer to interrupt in time to handle
the nearest timer and turns off the time base interrupt source. As part of
qualifying the entry to this state I want to make sure there is no pending
work so, from the idle task I have this:
if (local_softirq_pending())
do_softirq();
BUG_ON(local_softirq_pending());
I did not really expect to find any pending softirqs, but, not only are
there some, they don't go away and the system BUGs. The offender is the
RCU task. The question is: is this normal or is there something wrong?
Why do you think there would not be any softirq pending after do_softirq() ?
What if the cpu gets a network interrupt which raises a softirq ?
Yes, but it is serviced on interrupt exit and the task level code would never
see it.
And yes, RCU processing in softirq context can re-raise the softirq.
AFAICS, it is perfectly normal.
My assumption was that, this being the idle task, RCU would be more than happy
to finish all its pending tasks.
It may be necessary for me to rethink the conditions required to go into the VST
state. I had assumed that it required NO softirq pending as a pre condition.
From this point on we would have the interrupt system off until the hardware
sleep instruction (hlt in the x86 case).
--
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/