aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-16 20:15:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-16 20:15:32 -0400
commitc100548d4610f727b95faffd69cb54cb280cd114 (patch)
tree0add41ffba7ced1f4742a327684fdb2bb57148c8 /kernel/sched.c
parent0473b7992943ee7b182aa4afeb602ba5d37d36e0 (diff)
parent55cd53404c5cc5fd94708232e3b4aa4a9388917b (diff)
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: scale sysctl_sched_shares_ratelimit with nr_cpus sched: fix rt-bandwidth hotplug race sched: fix the race between walk_tg_tree and sched_create_group
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 95e6ad3c231d..9a1ddb84e26d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -808,9 +808,9 @@ const_debug unsigned int sysctl_sched_nr_migrate = 32;
808 808
809/* 809/*
810 * ratelimit for updating the group shares. 810 * ratelimit for updating the group shares.
811 * default: 0.5ms 811 * default: 0.25ms
812 */ 812 */
813const_debug unsigned int sysctl_sched_shares_ratelimit = 500000; 813unsigned int sysctl_sched_shares_ratelimit = 250000;
814 814
815/* 815/*
816 * period over which we measure -rt task cpu usage in us. 816 * period over which we measure -rt task cpu usage in us.
@@ -5786,6 +5786,8 @@ static inline void sched_init_granularity(void)
5786 sysctl_sched_latency = limit; 5786 sysctl_sched_latency = limit;
5787 5787
5788 sysctl_sched_wakeup_granularity *= factor; 5788 sysctl_sched_wakeup_granularity *= factor;
5789
5790 sysctl_sched_shares_ratelimit *= factor;
5789} 5791}
5790 5792
5791#ifdef CONFIG_SMP 5793#ifdef CONFIG_SMP
@@ -8508,8 +8510,8 @@ struct task_group *sched_create_group(struct task_group *parent)
8508 WARN_ON(!parent); /* root should already exist */ 8510 WARN_ON(!parent); /* root should already exist */
8509 8511
8510 tg->parent = parent; 8512 tg->parent = parent;
8511 list_add_rcu(&tg->siblings, &parent->children);
8512 INIT_LIST_HEAD(&tg->children); 8513 INIT_LIST_HEAD(&tg->children);
8514 list_add_rcu(&tg->siblings, &parent->children);
8513 spin_unlock_irqrestore(&task_group_lock, flags); 8515 spin_unlock_irqrestore(&task_group_lock, flags);
8514 8516
8515 return tg; 8517 return tg;