Re: rcutorture: Consider FROZEN hotplug notifier transitions

From: Paul E. McKenney
Date: Thu Mar 17 2016 - 11:06:57 EST


On Thu, Mar 17, 2016 at 11:14:35AM +0100, Anna-Maria Gleixner wrote:
> The hotplug notifier rcutorture_cpu_notify() doesn't consider the
> corresponding CPU_XXX_FROZEN transitions. They occure on
> suspend/resume and are usually handled the same way as the
> corresponding non frozen transitions.
>
> Mask the switch case action argument with '~CPU_TASKS_FROZEN' to map
> CPU_XXX_FROZEN hotplug transitions on corresponding non frozen
> transitions.
>
> Cc: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
> Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Anna-Maria Gleixner <anna-maria@xxxxxxxxxxxxx>

Queued for review and testing, thank you! If all goes well, I will
push this into the 4.7 merge window (not the current one, but the
next one).

Thanx, Paul

> ---
> kernel/rcu/rcutorture.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/kernel/rcu/rcutorture.c
> +++ b/kernel/rcu/rcutorture.c
> @@ -1598,7 +1598,7 @@ static int rcutorture_cpu_notify(struct
> {
> long cpu = (long)hcpu;
>
> - switch (action) {
> + switch (action & ~CPU_TASKS_FROZEN) {
> case CPU_ONLINE:
> case CPU_DOWN_FAILED:
> (void)rcutorture_booster_init(cpu);
>