]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Jan 2010 16:49:52 +0000 (08:49 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Jan 2010 16:49:52 +0000 (08:49 -0800)
* '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

include/linux/topology.h
kernel/sched.c
kernel/sched_fair.c

index 57e63579bfdd7f193511675fc9ed26141b586638..5b81156780b17f8bf52608ca7b8230dd638a530a 100644 (file)
@@ -99,7 +99,7 @@ int arch_update_cpu_topology(void);
                                | 1*SD_WAKE_AFFINE                      \
                                | 1*SD_SHARE_CPUPOWER                   \
                                | 0*SD_POWERSAVINGS_BALANCE             \
-                               | 0*SD_SHARE_PKG_RESOURCES              \
+                               | 1*SD_SHARE_PKG_RESOURCES              \
                                | 0*SD_SERIALIZE                        \
                                | 0*SD_PREFER_SIBLING                   \
                                ,                                       \
index c535cc4f6428bcd09405c2f4a3322f9b41de7eaa..4508fe7048be5d91ee5a01daef3fe9de8d37b909 100644 (file)
@@ -5530,8 +5530,11 @@ need_resched_nonpreemptible:
 
        post_schedule(rq);
 
-       if (unlikely(reacquire_kernel_lock(current) < 0))
+       if (unlikely(reacquire_kernel_lock(current) < 0)) {
+               prev = rq->curr;
+               switch_count = &prev->nivcsw;
                goto need_resched_nonpreemptible;
+       }
 
        preempt_enable_no_resched();
        if (need_resched())
index 42ac3c9f66f68868bb651f6c163483d6713b6eea..8fe7ee81c55270dc5893a9e2df94a1dbc7450dd6 100644 (file)
@@ -1508,7 +1508,7 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flag
                         * If there's an idle sibling in this domain, make that
                         * the wake_affine target instead of the current cpu.
                         */
-                       if (tmp->flags & SD_PREFER_SIBLING)
+                       if (tmp->flags & SD_SHARE_PKG_RESOURCES)
                                target = select_idle_sibling(p, tmp, target);
 
                        if (target >= 0) {