aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched_fair.c9
-rw-r--r--kernel/sysctl.c7
2 files changed, 15 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index b320753aa6c9..6c84439ce987 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -89,6 +89,13 @@ unsigned int normalized_sysctl_sched_wakeup_granularity = 1000000UL;
89 89
90const_debug unsigned int sysctl_sched_migration_cost = 500000UL; 90const_debug unsigned int sysctl_sched_migration_cost = 500000UL;
91 91
92/*
93 * The exponential sliding window over which load is averaged for shares
94 * distribution.
95 * (default: 10msec)
96 */
97unsigned int __read_mostly sysctl_sched_shares_window = 10000000UL;
98
92static const struct sched_class fair_sched_class; 99static const struct sched_class fair_sched_class;
93 100
94/************************************************************** 101/**************************************************************
@@ -688,7 +695,7 @@ account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se)
688#if defined CONFIG_SMP && defined CONFIG_FAIR_GROUP_SCHED 695#if defined CONFIG_SMP && defined CONFIG_FAIR_GROUP_SCHED
689static void update_cfs_load(struct cfs_rq *cfs_rq) 696static void update_cfs_load(struct cfs_rq *cfs_rq)
690{ 697{
691 u64 period = sched_avg_period(); 698 u64 period = sysctl_sched_shares_window;
692 u64 now, delta; 699 u64 now, delta;
693 unsigned long load = cfs_rq->load.weight; 700 unsigned long load = cfs_rq->load.weight;
694 701
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 3132b25193db..9b520d74f052 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -333,6 +333,13 @@ static struct ctl_table kern_table[] = {
333 .proc_handler = proc_dointvec, 333 .proc_handler = proc_dointvec,
334 }, 334 },
335 { 335 {
336 .procname = "sched_shares_window",
337 .data = &sysctl_sched_shares_window,
338 .maxlen = sizeof(unsigned int),
339 .mode = 0644,
340 .proc_handler = proc_dointvec,
341 },
342 {
336 .procname = "timer_migration", 343 .procname = "timer_migration",
337 .data = &sysctl_timer_migration, 344 .data = &sysctl_timer_migration,
338 .maxlen = sizeof(unsigned int), 345 .maxlen = sizeof(unsigned int),