diff options
author | Paul Turner <pjt@google.com> | 2011-07-21 12:43:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-08-14 06:03:26 -0400 |
commit | ec12cb7f31e28854efae7dd6f9544e0a66379040 (patch) | |
tree | 30a7293a4f9d566043f524bb4c43d4ae8b0560db /kernel/sysctl.c | |
parent | a790de99599a29ad3f18667530cf4b9f4b7e3234 (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 <pjt@google.com>
Signed-off-by: Nikhil Rao <ncrao@google.com>
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20110721184757.179386821@google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 11d65b531e50..2d2ecdcc8cdb 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -379,6 +379,16 @@ static struct ctl_table kern_table[] = { | |||
379 | .extra2 = &one, | 379 | .extra2 = &one, |
380 | }, | 380 | }, |
381 | #endif | 381 | #endif |
382 | #ifdef CONFIG_CFS_BANDWIDTH | ||
383 | { | ||
384 | .procname = "sched_cfs_bandwidth_slice_us", | ||
385 | .data = &sysctl_sched_cfs_bandwidth_slice, | ||
386 | .maxlen = sizeof(unsigned int), | ||
387 | .mode = 0644, | ||
388 | .proc_handler = proc_dointvec_minmax, | ||
389 | .extra1 = &one, | ||
390 | }, | ||
391 | #endif | ||
382 | #ifdef CONFIG_PROVE_LOCKING | 392 | #ifdef CONFIG_PROVE_LOCKING |
383 | { | 393 | { |
384 | .procname = "prove_locking", | 394 | .procname = "prove_locking", |