diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-21 11:49:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-21 11:49:52 -0500 |
commit | 341031caec0cd730e84d248d95851bf54ec4e41f (patch) | |
tree | f9531f3bef8446e0eb2f9f4ba1ed6fa1000585c8 | |
parent | 836f48c5f8c6ef004419f1605514aa05eb58eefb (diff) | |
parent | 6d558c3ac9b6508d26fd5cadccce51fc9d726b1c (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: Reassign prev and switch_count when reacquire_kernel_lock() fail
sched: Fix vmark regression on big machines
-rw-r--r-- | include/linux/topology.h | 2 | ||||
-rw-r--r-- | kernel/sched.c | 5 | ||||
-rw-r--r-- | kernel/sched_fair.c | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/topology.h b/include/linux/topology.h index 57e63579bfdd..5b81156780b1 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -99,7 +99,7 @@ int arch_update_cpu_topology(void); | |||
99 | | 1*SD_WAKE_AFFINE \ | 99 | | 1*SD_WAKE_AFFINE \ |
100 | | 1*SD_SHARE_CPUPOWER \ | 100 | | 1*SD_SHARE_CPUPOWER \ |
101 | | 0*SD_POWERSAVINGS_BALANCE \ | 101 | | 0*SD_POWERSAVINGS_BALANCE \ |
102 | | 0*SD_SHARE_PKG_RESOURCES \ | 102 | | 1*SD_SHARE_PKG_RESOURCES \ |
103 | | 0*SD_SERIALIZE \ | 103 | | 0*SD_SERIALIZE \ |
104 | | 0*SD_PREFER_SIBLING \ | 104 | | 0*SD_PREFER_SIBLING \ |
105 | , \ | 105 | , \ |
diff --git a/kernel/sched.c b/kernel/sched.c index c535cc4f6428..4508fe7048be 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5530,8 +5530,11 @@ need_resched_nonpreemptible: | |||
5530 | 5530 | ||
5531 | post_schedule(rq); | 5531 | post_schedule(rq); |
5532 | 5532 | ||
5533 | if (unlikely(reacquire_kernel_lock(current) < 0)) | 5533 | if (unlikely(reacquire_kernel_lock(current) < 0)) { |
5534 | prev = rq->curr; | ||
5535 | switch_count = &prev->nivcsw; | ||
5534 | goto need_resched_nonpreemptible; | 5536 | goto need_resched_nonpreemptible; |
5537 | } | ||
5535 | 5538 | ||
5536 | preempt_enable_no_resched(); | 5539 | preempt_enable_no_resched(); |
5537 | if (need_resched()) | 5540 | if (need_resched()) |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 42ac3c9f66f6..8fe7ee81c552 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -1508,7 +1508,7 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flag | |||
1508 | * If there's an idle sibling in this domain, make that | 1508 | * If there's an idle sibling in this domain, make that |
1509 | * the wake_affine target instead of the current cpu. | 1509 | * the wake_affine target instead of the current cpu. |
1510 | */ | 1510 | */ |
1511 | if (tmp->flags & SD_PREFER_SIBLING) | 1511 | if (tmp->flags & SD_SHARE_PKG_RESOURCES) |
1512 | target = select_idle_sibling(p, tmp, target); | 1512 | target = select_idle_sibling(p, tmp, target); |
1513 | 1513 | ||
1514 | if (target >= 0) { | 1514 | if (target >= 0) { |