On Wed, Aug 21, 2019 at 09:08:55PM +0200, Thomas Gleixner wrote: > cpu_clock_sample_group() and cpu_timer_sample_group() are almost the > same. Before the rename one called thread_group_cputimer() and the other > thread_group_cputime(). Really intuitive function names. > > Consolidate the functions and also avoid the thread traversal when > the thread group's accounting is already active. > > Signed-off-by: Thomas Gleixner <t...@linutronix.de> > --- [snip] > @@ -755,7 +736,7 @@ static void posix_cpu_timer_get(struct k > timer->it.cpu.expires = 0; > return; > } else { > - cpu_timer_sample_group(timer->it_clock, p, &now); > + cpu_clock_sample_group(timer->it_clock, p, &now, false);
We might want to warn here if !cputimer->running. Reviewed-by: Frederic Weisbecker <frede...@kernel.org>