]> Git Repo - linux.git/commit - kernel/sched.c
sched: Introduce task_times() to replace task_{u,s}time() pair
authorHidetoshi Seto <[email protected]>
Thu, 26 Nov 2009 05:48:30 +0000 (14:48 +0900)
committerIngo Molnar <[email protected]>
Thu, 26 Nov 2009 11:59:19 +0000 (12:59 +0100)
commitd180c5bccec02612256fd8076ff3c1fac3429553
tree1ef4a45c81531645640380965916c68bbe7f6abb
parent16bc67edeb49b531940b2ba6c183780a1b5c472d
sched: Introduce task_times() to replace task_{u,s}time() pair

Functions task_{u,s}time() are called in pair in almost all
cases.  However task_stime() is implemented to call task_utime()
from its inside, so such paired calls run task_utime() twice.

It means we do heavy divisions (div_u64 + do_div) twice to get
utime and stime which can be obtained at same time by one set
of divisions.

This patch introduces a function task_times(*tsk, *utime,
*stime) to retrieve utime and stime at once in better, optimized
way.

Signed-off-by: Hidetoshi Seto <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Stanislaw Gruszka <[email protected]>
Cc: Spencer Candland <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Americo Wang <[email protected]>
LKML-Reference: <4B0E16AE[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
fs/proc/array.c
include/linux/sched.h
kernel/exit.c
kernel/sched.c
kernel/sys.c
This page took 0.054404 seconds and 4 git commands to generate.