]> git.baikalelectronics.ru Git - kernel.git/commit
timers: split process wide cpu clocks/timers
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Thu, 5 Feb 2009 11:24:16 +0000 (12:24 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 5 Feb 2009 12:04:33 +0000 (13:04 +0100)
commit40fdc5fb0b1563988b827eb21fb1fc4a2e8c7e1f
treeb1e580d5284648d6884e951d995509094a92cca4
parentc4b82e4459d38db29d12fe669143de8f201620fc
timers: split process wide cpu clocks/timers

Change the process wide cpu timers/clocks so that we:

 1) don't mess up the kernel with too many threads,
 2) don't have a per-cpu allocation for each process,
 3) have no impact when not used.

In order to accomplish this we're going to split it into two parts:

 - clocks; which can take all the time they want since they run
           from user context -- ie. sys_clock_gettime(CLOCK_PROCESS_CPUTIME_ID)

 - timers; which need constant time sampling but since they're
           explicity used, the user can pay the overhead.

The clock readout will go back to a full sum of the thread group, while the
timers will run of a global 'clock' that only runs when needed, so only
programs that make use of the facility pay the price.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/init_task.h
include/linux/sched.h
kernel/itimer.c
kernel/posix-cpu-timers.c
kernel/sched_stats.h