diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-07-21 15:45:02 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-07-21 15:45:08 -0400 |
commit | dca45ad8af54963c005393a484ad117b8ba6150f (patch) | |
tree | 7c9a6966283a6bb12b54e5680a67d203be292930 /kernel/sched.c | |
parent | 68c38fc3cb4e5a60f502ee9c45f3dfe70e5165ad (diff) | |
parent | cd5b8f8755a89a57fc8c408d284b8b613f090345 (diff) |
Merge branch 'linus' into sched/core
Merge reason: Move from the -rc3 to the almost-rc6 base.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 7b443ee27be4..16f3f77f71be 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1277,6 +1277,12 @@ static void sched_avg_update(struct rq *rq) | |||
1277 | s64 period = sched_avg_period(); | 1277 | s64 period = sched_avg_period(); |
1278 | 1278 | ||
1279 | while ((s64)(rq->clock - rq->age_stamp) > period) { | 1279 | while ((s64)(rq->clock - rq->age_stamp) > period) { |
1280 | /* | ||
1281 | * Inline assembly required to prevent the compiler | ||
1282 | * optimising this loop into a divmod call. | ||
1283 | * See __iter_div_u64_rem() for another example of this. | ||
1284 | */ | ||
1285 | asm("" : "+rm" (rq->age_stamp)); | ||
1280 | rq->age_stamp += period; | 1286 | rq->age_stamp += period; |
1281 | rq->rt_avg /= 2; | 1287 | rq->rt_avg /= 2; |
1282 | } | 1288 | } |
@@ -1680,9 +1686,6 @@ static void update_shares(struct sched_domain *sd) | |||
1680 | 1686 | ||
1681 | static void update_h_load(long cpu) | 1687 | static void update_h_load(long cpu) |
1682 | { | 1688 | { |
1683 | if (root_task_group_empty()) | ||
1684 | return; | ||
1685 | |||
1686 | walk_tg_tree(tg_load_down, tg_nop, (void *)cpu); | 1689 | walk_tg_tree(tg_load_down, tg_nop, (void *)cpu); |
1687 | } | 1690 | } |
1688 | 1691 | ||
@@ -2564,7 +2567,16 @@ void sched_fork(struct task_struct *p, int clone_flags) | |||
2564 | if (p->sched_class->task_fork) | 2567 | if (p->sched_class->task_fork) |
2565 | p->sched_class->task_fork(p); | 2568 | p->sched_class->task_fork(p); |
2566 | 2569 | ||
2570 | /* | ||
2571 | * The child is not yet in the pid-hash so no cgroup attach races, | ||
2572 | * and the cgroup is pinned to this child due to cgroup_fork() | ||
2573 | * is ran before sched_fork(). | ||
2574 | * | ||
2575 | * Silence PROVE_RCU. | ||
2576 | */ | ||
2577 | rcu_read_lock(); | ||
2567 | set_task_cpu(p, cpu); | 2578 | set_task_cpu(p, cpu); |
2579 | rcu_read_unlock(); | ||
2568 | 2580 | ||
2569 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 2581 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
2570 | if (likely(sched_info_on())) | 2582 | if (likely(sched_info_on())) |
@@ -2934,9 +2946,9 @@ unsigned long nr_iowait(void) | |||
2934 | return sum; | 2946 | return sum; |
2935 | } | 2947 | } |
2936 | 2948 | ||
2937 | unsigned long nr_iowait_cpu(void) | 2949 | unsigned long nr_iowait_cpu(int cpu) |
2938 | { | 2950 | { |
2939 | struct rq *this = this_rq(); | 2951 | struct rq *this = cpu_rq(cpu); |
2940 | return atomic_read(&this->nr_iowait); | 2952 | return atomic_read(&this->nr_iowait); |
2941 | } | 2953 | } |
2942 | 2954 | ||