lkml.org 
[lkml]   [2004]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    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,

    Zwane

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

    \
     
     \ /
      Last update: 2005-03-22 14:08    [W:0.023 / U:32.696 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site