Skip to content

Commit

Permalink
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Linus Torvalds committed Aug 17, 2008
2 parents 0473b79 + 55cd534 commit c100548
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,9 +808,9 @@ const_debug unsigned int sysctl_sched_nr_migrate = 32;

/*
* ratelimit for updating the group shares.
* default: 0.5ms
* default: 0.25ms
*/
const_debug unsigned int sysctl_sched_shares_ratelimit = 500000;
unsigned int sysctl_sched_shares_ratelimit = 250000;

/*
* period over which we measure -rt task cpu usage in us.
Expand Down Expand Up @@ -5786,6 +5786,8 @@ static inline void sched_init_granularity(void)
sysctl_sched_latency = limit;

sysctl_sched_wakeup_granularity *= factor;

sysctl_sched_shares_ratelimit *= factor;
}

#ifdef CONFIG_SMP
Expand Down Expand Up @@ -8508,8 +8510,8 @@ struct task_group *sched_create_group(struct task_group *parent)
WARN_ON(!parent); /* root should already exist */

tg->parent = parent;
list_add_rcu(&tg->siblings, &parent->children);
INIT_LIST_HEAD(&tg->children);
list_add_rcu(&tg->siblings, &parent->children);
spin_unlock_irqrestore(&task_group_lock, flags);

return tg;
Expand Down
2 changes: 1 addition & 1 deletion kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ static void __disable_runtime(struct rq *rq)
struct rt_rq *iter = sched_rt_period_rt_rq(rt_b, i);
s64 diff;

if (iter == rt_rq)
if (iter == rt_rq || iter->rt_runtime == RUNTIME_INF)
continue;

spin_lock(&iter->rt_runtime_lock);
Expand Down

0 comments on commit c100548

Please sign in to comment.