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

2019-08-21 Thread Peter Zijlstra
On Wed, Aug 21, 2019 at 08:20:48AM +, Long Li wrote: > >>>Subject: Re: [PATCH 1/3] sched: define a function to report the number of > >>>context switches on a CPU > >>> > >>>On Mon, Aug 19, 2019 at 11:14:27PM -0700, lon...@linuxonhyperv.com > >>>wrote: > From: Long Li > > The

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

2019-08-21 Thread Long Li
>>>Subject: Re: [PATCH 1/3] sched: define a function to report the number of >>>context switches on a CPU >>> >>>On Mon, Aug 19, 2019 at 11:14:27PM -0700, lon...@linuxonhyperv.com >>>wrote: From: Long Li The number of context switches on a CPU is useful to determine how busy

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

2019-08-20 Thread Peter Zijlstra
On Mon, Aug 19, 2019 at 11:14:27PM -0700, lon...@linuxonhyperv.com 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.

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

2019-08-20 Thread Peter Zijlstra
On Mon, Aug 19, 2019 at 11:14:27PM -0700, lon...@linuxonhyperv.com wrote: > From: Long Li > > The number of context switches on a CPU is useful to determine how busy this > CPU is on processing IRQs. Export this information so it can be used by device > drivers. Please do explain that; because

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

2019-08-20 Thread longli
From: Long Li The number of context switches on a CPU is useful to determine how busy this CPU is on processing IRQs. Export this information so it can be used by device drivers. Signed-off-by: Long Li --- include/linux/sched.h | 1 + kernel/sched/core.c | 6 ++ 2 files changed, 7