diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-08-21 21:08:52 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-08-28 11:50:26 +0200 |
commit | a34360d42434bbf28c0f375444c52c154ae3e6cf (patch) | |
tree | 0e45f45b48c0db9dfbe61d0d06e0c485c6a1718e /kernel/time | |
parent | 19298fbf453c90a6cf72288155f80c6f55e9139d (diff) | |
download | linux-next-a34360d42434bbf28c0f375444c52c154ae3e6cf.tar.gz |
itimers: Use quick sample function
get_itimer() locks sighand lock and checks whether the timer is already
expired. If it is not expired then the thread group cputime accounting is
already enabled. Use the sampling function not the one which is meant for
starting a timer.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lkml.kernel.org/r/20190821192919.689713638@linutronix.de
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/itimer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/time/itimer.c b/kernel/time/itimer.c index 9d26fd4ba4c0..ae04bc259240 100644 --- a/kernel/time/itimer.c +++ b/kernel/time/itimer.c @@ -58,7 +58,7 @@ static void get_cpu_itimer(struct task_struct *tsk, unsigned int clock_id, struct task_cputime cputime; u64 t; - thread_group_cputimer(tsk, &cputime); + thread_group_sample_cputime(tsk, &cputime); if (clock_id == CPUCLOCK_PROF) t = cputime.utime + cputime.stime; else |