lkml.org 
[lkml]   [2020]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] psi: fix randomized calculation in record_times()
On Fri, Apr 03, 2020 at 04:55:25AM -0400, Yafang Shao wrote:
> @@ -690,7 +690,10 @@ static void psi_group_change(struct psi_group *group, int cpu,
> */
> write_seqcount_begin(&groupc->seq);
>
> - record_times(groupc, cpu, false);
> + if (groupc->total_tasks)
> + record_times(groupc, cpu, false);
> + else
> + groupc->state_start = cpu_clock(cpu);

This change appears is a no-op. If there are no tasks,
groupc->state_mask is 0, and the only thing record_times() does is

groupc->state_start = cpu_clock(cpu);

Did you encounter actual problems, or are you just reading the code?

\
 
 \ /
  Last update: 2020-04-03 17:20    [W:0.103 / U:3.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site