path: root/kernel/sysctl.c
diff options
authorPaul Turner <>2011-07-21 16:43:30 (GMT)
committerIngo Molnar <>2011-08-14 10:03:26 (GMT)
commitec12cb7f31e28854efae7dd6f9544e0a66379040 (patch)
tree30a7293a4f9d566043f524bb4c43d4ae8b0560db /kernel/sysctl.c
parenta790de99599a29ad3f18667530cf4b9f4b7e3234 (diff)
sched: Accumulate per-cfs_rq cpu usage and charge against bandwidth
Account bandwidth usage on the cfs_rq level versus the task_groups to which they belong. Whether we are tracking bandwidth on a given cfs_rq is maintained under cfs_rq->runtime_enabled. cfs_rq's which belong to a bandwidth constrained task_group have their runtime accounted via the update_curr() path, which withdraws bandwidth from the global pool as desired. Updates involving the global pool are currently protected under cfs_bandwidth->lock, local runtime is protected by rq->lock. This patch only assigns and tracks quota, no action is taken in the case that cfs_rq->runtime_used exceeds cfs_rq->runtime_assigned. Signed-off-by: Paul Turner <> Signed-off-by: Nikhil Rao <> Signed-off-by: Bharata B Rao <> Reviewed-by: Hidetoshi Seto <> Signed-off-by: Peter Zijlstra <> Link: Signed-off-by: Ingo Molnar <>
Diffstat (limited to 'kernel/sysctl.c')
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 11d65b5..2d2ecdc 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -379,6 +379,16 @@ static struct ctl_table kern_table[] = {
.extra2 = &one,
+ {
+ .procname = "sched_cfs_bandwidth_slice_us",
+ .data = &sysctl_sched_cfs_bandwidth_slice,
+ .maxlen = sizeof(unsigned int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = &one,
+ },
.procname = "prove_locking",