Re: [PATCH v2] rcu: Allow to eliminate softirq processing from rcutree

From: Sebastian Andrzej Siewior
Date: Wed Mar 20 2019 - 07:32:24 EST


On 2019-03-19 12:44:19 [+0100], To Paul E. McKenney wrote:
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 0f31b79eb6761..0a719f726e149 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
â
> +/*
> + * Spawn per-CPU RCU core processing kthreads.
> + */
> +static int __init rcu_spawn_core_kthreads(void)
> +{
> + int cpu;
> +
> + for_each_possible_cpu(cpu)
> + per_cpu(rcu_data.rcu_cpu_has_work, cpu) = 0;
> + if (!IS_ENABLED(CONFIG_RCU_BOOST) && !rcu_softirq_enabled)

and this needs to become
- if (!IS_ENABLED(CONFIG_RCU_BOOST) && !rcu_softirq_enabled)
+ if (!IS_ENABLED(CONFIG_RCU_BOOST) && rcu_softirq_enabled)

With this change and hunk that I just sent to Joel I get thee three RCU
modes with and without BOOST booted.

Unless there is something (and Paul agrees that the Joel hunk is
correct) I would post a v3 with those changes included.

> + return 0;
> + WARN_ONCE(smpboot_register_percpu_thread(&rcu_cpu_thread_spec), "%s: Could not start rcub kthread, OOM is now expected behavior\n", __func__);
> + return 0;
> +}
> +early_initcall(rcu_spawn_core_kthreads);

Sebastian