Messages in this thread | | | Date | Fri, 3 Apr 2020 11:20:16 -0400 | From | Johannes Weiner <> | Subject | Re: [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?
| |