Re: [PATCH 1/3] sched: define a function to report the number of context switches on a CPU

From: Peter Zijlstra
Date: Tue Aug 20 2019 - 05:39:23 EST


On Mon, Aug 19, 2019 at 11:14:27PM -0700, longli@xxxxxxxxxxxxxxxxx wrote:

> +u64 get_cpu_rq_switches(int cpu)
> +{
> + return cpu_rq(cpu)->nr_switches;
> +}
> +EXPORT_SYMBOL_GPL(get_cpu_rq_switches);

Also, that is broken on 32bit.