Messages in this thread | | | Date | Thu, 22 Aug 2019 15:49:21 +0200 | From | Frederic Weisbecker <> | Subject | Re: [patch V2 08/38] posix-cpu-timers: Consolidate thread group sample code |
| |
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 <tglx@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 <frederic@kernel.org>
| |