diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-04-18 08:53:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-18 08:53:33 -0400 |
commit | 6ddafdaab3f809b110ada253d2f2d4910ebd3ac5 (patch) | |
tree | 366bb7513511a05b6e11ab89bfe3b2dbd1d62a03 /kernel/sched_fair.c | |
parent | 3905c54f2bd2c6f937f87307987ca072eabc3e7b (diff) | |
parent | bd8e7dded88a3e1c085c333f19ff31387616f71a (diff) |
Merge branch 'sched/locking' into sched/core
Merge reason: the rq locking changes are stable,
propagate them into the .40 queue.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 9c5679cfe3b0..87445931a179 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -358,6 +358,10 @@ static void update_min_vruntime(struct cfs_rq *cfs_rq) | |||
358 | } | 358 | } |
359 | 359 | ||
360 | cfs_rq->min_vruntime = max_vruntime(cfs_rq->min_vruntime, vruntime); | 360 | cfs_rq->min_vruntime = max_vruntime(cfs_rq->min_vruntime, vruntime); |
361 | #ifndef CONFIG_64BIT | ||
362 | smp_wmb(); | ||
363 | cfs_rq->min_vruntime_copy = cfs_rq->min_vruntime; | ||
364 | #endif | ||
361 | } | 365 | } |
362 | 366 | ||
363 | /* | 367 | /* |
@@ -1372,12 +1376,25 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags) | |||
1372 | 1376 | ||
1373 | #ifdef CONFIG_SMP | 1377 | #ifdef CONFIG_SMP |
1374 | 1378 | ||
1375 | static void task_waking_fair(struct rq *rq, struct task_struct *p) | 1379 | static void task_waking_fair(struct task_struct *p) |
1376 | { | 1380 | { |
1377 | struct sched_entity *se = &p->se; | 1381 | struct sched_entity *se = &p->se; |
1378 | struct cfs_rq *cfs_rq = cfs_rq_of(se); | 1382 | struct cfs_rq *cfs_rq = cfs_rq_of(se); |
1383 | u64 min_vruntime; | ||
1379 | 1384 | ||
1380 | se->vruntime -= cfs_rq->min_vruntime; | 1385 | #ifndef CONFIG_64BIT |
1386 | u64 min_vruntime_copy; | ||
1387 | |||
1388 | do { | ||
1389 | min_vruntime_copy = cfs_rq->min_vruntime_copy; | ||
1390 | smp_rmb(); | ||
1391 | min_vruntime = cfs_rq->min_vruntime; | ||
1392 | } while (min_vruntime != min_vruntime_copy); | ||
1393 | #else | ||
1394 | min_vruntime = cfs_rq->min_vruntime; | ||
1395 | #endif | ||
1396 | |||
1397 | se->vruntime -= min_vruntime; | ||
1381 | } | 1398 | } |
1382 | 1399 | ||
1383 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1400 | #ifdef CONFIG_FAIR_GROUP_SCHED |
@@ -1659,7 +1676,7 @@ static int select_idle_sibling(struct task_struct *p, int target) | |||
1659 | * preempt must be disabled. | 1676 | * preempt must be disabled. |
1660 | */ | 1677 | */ |
1661 | static int | 1678 | static int |
1662 | select_task_rq_fair(struct rq *rq, struct task_struct *p, int sd_flag, int wake_flags) | 1679 | select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags) |
1663 | { | 1680 | { |
1664 | struct sched_domain *tmp, *affine_sd = NULL, *sd = NULL; | 1681 | struct sched_domain *tmp, *affine_sd = NULL, *sd = NULL; |
1665 | int cpu = smp_processor_id(); | 1682 | int cpu = smp_processor_id(); |