diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-08-21 21:09:16 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-08-28 11:50:39 +0200 |
commit | b7be4ef1365dcb56fdffc6689e41058b23f5996d (patch) | |
tree | f1f003cb9044c60960f43cb35828b4aa54095ee5 /kernel/time/itimer.c | |
parent | posix-cpu-timers: Restructure expiry array (diff) | |
download | linux-b7be4ef1365dcb56fdffc6689e41058b23f5996d.tar.xz linux-b7be4ef1365dcb56fdffc6689e41058b23f5996d.zip |
posix-cpu-timers: Switch thread group sampling to array
That allows more simplifications in various places.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lkml.kernel.org/r/20190821192921.988426956@linutronix.de
Diffstat (limited to 'kernel/time/itimer.c')
-rw-r--r-- | kernel/time/itimer.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/time/itimer.c b/kernel/time/itimer.c index ae04bc259240..77f1e5635cc1 100644 --- a/kernel/time/itimer.c +++ b/kernel/time/itimer.c @@ -55,15 +55,10 @@ static void get_cpu_itimer(struct task_struct *tsk, unsigned int clock_id, val = it->expires; interval = it->incr; if (val) { - struct task_cputime cputime; - u64 t; + u64 t, samples[CPUCLOCK_MAX]; - thread_group_sample_cputime(tsk, &cputime); - if (clock_id == CPUCLOCK_PROF) - t = cputime.utime + cputime.stime; - else - /* CPUCLOCK_VIRT */ - t = cputime.utime; + thread_group_sample_cputime(tsk, samples); + t = samples[clock_id]; if (val < t) /* about to fire */ |