lkml.org 
[lkml]   [2017]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 tip/core/rcu 15/40] srcu: Allow early boot use of synchronize_srcu()
    Date
    This commit checks for pre-scheduler state, and if that early in the
    boot process, synchronize_srcu() and friends are no-ops.

    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    ---
    kernel/rcu/srcu.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/kernel/rcu/srcu.c b/kernel/rcu/srcu.c
    index e6da9fc1f0e9..7e7ecaa50dc5 100644
    --- a/kernel/rcu/srcu.c
    +++ b/kernel/rcu/srcu.c
    @@ -417,6 +417,8 @@ static void __synchronize_srcu(struct srcu_struct *sp, int trycount)
    lock_is_held(&rcu_sched_lock_map),
    "Illegal synchronize_srcu() in same-type SRCU (or in RCU) read-side critical section");

    + if (rcu_scheduler_active == RCU_SCHEDULER_INACTIVE)
    + return;
    might_sleep();
    init_completion(&rcu.completion);

    --
    2.5.2
    \
     
     \ /
      Last update: 2017-04-19 19:06    [W:4.848 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site