summaryrefslogtreecommitdiff
path: root/include/linux/psi_types.h
diff options
context:
space:
mode:
authorVincent Donnefort <vincent.donnefort@arm.com>2021-02-16 13:35:06 +0300
committerIngo Molnar <mingo@kernel.org>2021-03-06 14:40:22 +0300
commit453e41085183980087f8a80dada523caf1131c3c (patch)
treeed5794ec1ec3186b9525d3f7737a008a5f3fe645 /include/linux/psi_types.h
parent62f250694092dd5fef9900dc3126f07110bf9d48 (diff)
downloadlinux-453e41085183980087f8a80dada523caf1131c3c.tar.xz
cpu/hotplug: Add cpuhp_invoke_callback_range()
Factorizing and unifying cpuhp callback range invocations, especially for the hotunplug path, where two different ways of decrementing were used. The first one, decrements before the callback is called: cpuhp_thread_fun() state = st->state; st->state--; cpuhp_invoke_callback(state); The second one, after: take_down_cpu()|cpuhp_down_callbacks() cpuhp_invoke_callback(st->state); st->state--; This is problematic for rolling back the steps in case of error, as depending on the decrement, the rollback will start from N or N-1. It also makes tracing inconsistent, between steps run in the cpuhp thread and the others. Additionally, avoid useless cpuhp_thread_fun() loops by skipping empty steps. Signed-off-by: Vincent Donnefort <vincent.donnefort@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lkml.kernel.org/r/20210216103506.416286-4-vincent.donnefort@arm.com
Diffstat (limited to 'include/linux/psi_types.h')
0 files changed, 0 insertions, 0 deletions