scheduler fixes for v2.6.24-rc4
Linus, please pull the latest scheduler git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched.git
this includes a single commit: a revert of a revert :-/ It turns out revert cfb5285660 went in by mistake (outside of sched.git). This commit has been tested quite extensively and it does not impact the normal case anyway.
Thanks!
Ingo
------------------>
Srivatsa Vaddagiri (1):
sched: cpu accounting controller (V2)
include/linux/cgroup_subsys.h | 7 + init/Kconfig | 7 + kernel/sched.c | 155 ++++++++++++++++++++++++++++++++++-------- kernel/sched_fair.c | 6 + kernel/sched_rt.c | 1 5 files changed, 150 insertions(+), 26 deletions(-)
include/linux/cgroup_subsys.h +7 -0
@@ -30,3 +30,10 @@ SUBSYS(cpu_cgroup)#endif /* */ + +#ifdef CONFIG_CGROUP_CPUACCT +SUBSYS(cpuacct) +#endif + +/* */ +
init/Kconfig +7 -0
@@ -354,6 +354,13 @@ config FAIR_CGROUP_SCHED endchoice +config CGROUP_CPUACCT + bool "Simple CPU accounting cgroup subsystem" + depends on CGROUPS + help + Provides a simple Resource Controller for monitoring the + total CPU consumed by the tasks in a cgroup + config SYSFS_DEPRECATED bool "Create deprecated sysfs files" default y
kernel/sched.c +129 -26
176 lines not on this page · raw message
kernel/sched_fair.c +6 -0
@@ -351,6 +351,12 @@ static void update_curr(struct cfs_rq *cfs_rq)__update_curr (cfs_rq, curr, delta_exec); curr->exec_start = now; + +if (entity_is_task (curr)) { +struct task_struct *curtask =task_of (curr); + +cpuacct_charge (curtask, delta_exec); + } } static inline void
kernel/sched_rt.c +1 -0
@@ -23,6 +23,7 @@ static void update_curr_rt(struct rq *rq) curr->se.sum_exec_runtime += delta_exec; curr->se.exec_start = rq->clock; +cpuacct_charge (curr, delta_exec); }static void enqueue_task_rt (struct rq *rq,struct task_struct *p,int wakeup)