lkml.org 
[lkml]   [2019]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?

\
 
 \ /
  Last update: 2019-12-04 13:36    [W:0.036 / U:6.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site