lkml.org 
[lkml]   [2021]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5/6] rcu/nocb: Allow empty "rcu_nocbs" kernel parameter
    Date
    If a user wants to boot without any CPU in offloaded mode initially but
    with the possibility to offload them later using cpusets, provide a way
    to simply pass an empty "rcu_nocbs" kernel parameter which will enforce
    the creation of dormant nocb kthreads.

    Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
    Cc: Neeraj Upadhyay <quic_neeraju@quicinc.com>
    Cc: Boqun Feng <boqun.feng@gmail.com>
    Cc: Uladzislau Rezki <urezki@gmail.com>
    Cc: Josh Triplett <josh@joshtriplett.org>
    Cc: Joel Fernandes <joel@joelfernandes.org>
    ---
    kernel/rcu/tree_nocb.h | 10 ++++++----
    1 file changed, 6 insertions(+), 4 deletions(-)

    diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
    index 1871f15b8472..3845f1885ffc 100644
    --- a/kernel/rcu/tree_nocb.h
    +++ b/kernel/rcu/tree_nocb.h
    @@ -66,14 +66,16 @@ static bool rcu_nocb_is_setup;
    static int __init rcu_nocb_setup(char *str)
    {
    alloc_bootmem_cpumask_var(&rcu_nocb_mask);
    - if (cpulist_parse(str, rcu_nocb_mask)) {
    - pr_warn("rcu_nocbs= bad CPU range, all CPUs set\n");
    - cpumask_setall(rcu_nocb_mask);
    + if (*str == '=') {
    + if (cpulist_parse(++str, rcu_nocb_mask)) {
    + pr_warn("rcu_nocbs= bad CPU range, all CPUs set\n");
    + cpumask_setall(rcu_nocb_mask);
    + }
    }
    rcu_nocb_is_setup = true;
    return 1;
    }
    -__setup("rcu_nocbs=", rcu_nocb_setup);
    +__setup("rcu_nocbs", rcu_nocb_setup);

    static int __init parse_rcu_nocb_poll(char *arg)
    {
    --
    2.25.1
    \
     
     \ /
      Last update: 2021-11-17 16:57    [W:4.878 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site