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

    \
     
     \ /
      Last update: 2019-08-22 15:49    [W:6.179 / U:0.140 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site