Commit a324956f authored by Thomas Gleixner's avatar Thomas Gleixner

posix-cpu-timers: Sample directly in timer check

The thread group accounting is active, otherwise the expiry function would
not be running. Sample the thread group time directly.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Link: https://lkml.kernel.org/r/20190821192919.780348088@linutronix.de
parent a34360d4
...@@ -921,9 +921,10 @@ static void check_process_timers(struct task_struct *tsk, ...@@ -921,9 +921,10 @@ static void check_process_timers(struct task_struct *tsk,
sig->cputimer.checking_timer = true; sig->cputimer.checking_timer = true;
/* /*
* Collect the current process totals. * Collect the current process totals. Group accounting is active
* so the sample can be taken directly.
*/ */
thread_group_cputimer(tsk, &cputime); sample_cputime_atomic(&cputime, &sig->cputimer.cputime_atomic);
utime = cputime.utime; utime = cputime.utime;
ptime = utime + cputime.stime; ptime = utime + cputime.stime;
sum_sched_runtime = cputime.sum_exec_runtime; sum_sched_runtime = cputime.sum_exec_runtime;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment