lkml.org 
[lkml]   [2019]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 15/44] posix-cpu-timer: Comsolidate thread group sample code

in the title:

s/Comsolidate
/Consolidate

* Thomas Gleixner <tglx@linutronix.de> 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 accounting is already active.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> kernel/time/posix-cpu-timers.c | 59 +++++++++++++----------------------------
> 1 file changed, 20 insertions(+), 39 deletions(-)
>
> --- a/kernel/time/posix-cpu-timers.c
> +++ b/kernel/time/posix-cpu-timers.c
> @@ -294,29 +294,37 @@ thread_group_start_cputime(struct task_s
> }
>
> /*
> - * Sample a process (thread group) clock for the given group_leader task.
> - * Must be called with task sighand lock held for safe while_each_thread()
> - * traversal.
> + * Sample a process (thread group) clock for the given task clkid. If the
> + * groups cputime accounting is already enabled, read the atomic
> + * store. Otherwise a full update is required. task sighand lock must be
> + * held to protect the task traversal on a full update.

s/groups
/group's

s/task sighand
/Task sighand

Thanks,

Ingo

\
 
 \ /
  Last update: 2019-08-19 21:08    [W:0.281 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site