Messages in this thread | | | Date | Wed, 4 Dec 2019 13:35:00 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH] psi: Only collect online cpu time in collect_percpu_times |
| |
On Mon, Dec 02, 2019 at 09:09:28PM +0800, Liu Song wrote: > From: Liu Song <liu.song11@zte.com.cn> > > Tasks can only run on the online cpu, so only need to > collect the time of the online cpu. > > Signed-off-by: Liu Song <liu.song11@zte.com.cn> > --- > kernel/sched/psi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c > index 7acc632c3b82..605f02facb7b 100644 > --- a/kernel/sched/psi.c > +++ b/kernel/sched/psi.c > @@ -316,7 +316,7 @@ static void collect_percpu_times(struct psi_group *group, > * the sampling period. This eliminates artifacts from uneven > * loading, or even entirely idle CPUs. > */ > - for_each_possible_cpu(cpu) { > + for_each_online_cpu(cpu) { > u32 times[NR_PSI_STATES]; > u32 nonidle; > u32 cpu_changed_states;
And who collects the deltas that remain after offline?
| |