[lkml]   [2004]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] Strange code in cpu_idle()
On Mon, 6 Dec 2004, Dipankar Sarma wrote:

> > > So I would say that the rcu_read_lock() in cpu_idle() is having no
> > > effect, because any timer interrupt from cpu_idle() will mark a
> > > quiescent state notwithstanding. What am I missing here?
> >
> > What about the hardirq_count check since we're coming in from the timer
> > interrupt?
> Look at the hardirq_count check closely - it only checks for reentrant
> hardirqs. If the idle task gets interrupted by a timer interrupt,
> the RCU quiscent state counter for the cpu will get incremented.
> So, rcu_read_lock() in cpu_idle() is bogus.

Ah crafty, the only reason it 'works' right now then is because we exit
the pm_idle callback shortly after processing the timer interrupt which
marks the processor as quiescent.

Thanks for pointing that out,


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:08    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean