sched: Add helper nr_context_switches_cpu()

Returns the number of context switches on the specified CPU, which can
be used to diagnose RCU CPU stalls.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2 files changed