Skip to content

Commit a34360d

Browse files
committed
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
1 parent 19298fb commit a34360d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/time/itimer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static void get_cpu_itimer(struct task_struct *tsk, unsigned int clock_id,
5858
struct task_cputime cputime;
5959
u64 t;
6060

61-
thread_group_cputimer(tsk, &cputime);
61+
thread_group_sample_cputime(tsk, &cputime);
6262
if (clock_id == CPUCLOCK_PROF)
6363
t = cputime.utime + cputime.stime;
6464
else

0 commit comments

Comments
 (0)