aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sched.h5
-rw-r--r--kernel/sched.c10
2 files changed, 2 insertions, 13 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 9c1da0269a18..b6f51e3a38ec 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -697,12 +697,9 @@ struct task_struct {
697 697
698 int lock_depth; /* BKL lock depth */ 698 int lock_depth; /* BKL lock depth */
699 699
700#if defined(CONFIG_SMP) 700#if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW)
701 int last_waker_cpu; /* CPU that last woke this task up */
702#if defined(__ARCH_WANT_UNLOCKED_CTXSW)
703 int oncpu; 701 int oncpu;
704#endif 702#endif
705#endif
706 int prio, static_prio; 703 int prio, static_prio;
707 struct list_head run_list; 704 struct list_head run_list;
708 prio_array_t *array; 705 prio_array_t *array;
diff --git a/kernel/sched.c b/kernel/sched.c
index 87d93be336a1..66d957227de9 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1204,9 +1204,6 @@ static int try_to_wake_up(task_t *p, unsigned int state, int sync)
1204 } 1204 }
1205 } 1205 }
1206 1206
1207 if (p->last_waker_cpu != this_cpu)
1208 goto out_set_cpu;
1209
1210 if (unlikely(!cpu_isset(this_cpu, p->cpus_allowed))) 1207 if (unlikely(!cpu_isset(this_cpu, p->cpus_allowed)))
1211 goto out_set_cpu; 1208 goto out_set_cpu;
1212 1209
@@ -1277,8 +1274,6 @@ out_set_cpu:
1277 cpu = task_cpu(p); 1274 cpu = task_cpu(p);
1278 } 1275 }
1279 1276
1280 p->last_waker_cpu = this_cpu;
1281
1282out_activate: 1277out_activate:
1283#endif /* CONFIG_SMP */ 1278#endif /* CONFIG_SMP */
1284 if (old_state == TASK_UNINTERRUPTIBLE) { 1279 if (old_state == TASK_UNINTERRUPTIBLE) {
@@ -1360,12 +1355,9 @@ void fastcall sched_fork(task_t *p, int clone_flags)
1360#ifdef CONFIG_SCHEDSTATS 1355#ifdef CONFIG_SCHEDSTATS
1361 memset(&p->sched_info, 0, sizeof(p->sched_info)); 1356 memset(&p->sched_info, 0, sizeof(p->sched_info));
1362#endif 1357#endif
1363#if defined(CONFIG_SMP) 1358#if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW)
1364 p->last_waker_cpu = cpu;
1365#if defined(__ARCH_WANT_UNLOCKED_CTXSW)
1366 p->oncpu = 0; 1359 p->oncpu = 0;
1367#endif 1360#endif
1368#endif
1369#ifdef CONFIG_PREEMPT 1361#ifdef CONFIG_PREEMPT
1370 /* Want to start with kernel preemption disabled. */ 1362 /* Want to start with kernel preemption disabled. */
1371 task_thread_info(p)->preempt_count = 1; 1363 task_thread_info(p)->preempt_count = 1;