• Paul E. McKenney's avatar
    rcu: Avoid redundant grace-period kthread wakeups · 1eafd31c
    Paul E. McKenney authored
    When setting up an in-the-future "advanced" grace period, the code needs
    to wake up the relevant grace-period kthread, which it currently does
    unconditionally.  However, this results in needless wakeups in the case
    where the advanced grace period is being set up by the grace-period
    kthread itself, which is a non-uncommon situation.  This commit therefore
    checks to see if the running thread is the grace-period kthread, and
    avoids doing the irq_work_queue()-mediated wakeup in that case.
    Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
    1eafd31c
rcutree.c 103 KB