diff options
Diffstat (limited to 'kernel/sched.c')
| -rw-r--r-- | kernel/sched.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 87d93be336a1..12d291bf3379 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 | |||
| 1282 | out_activate: | 1277 | out_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; |
| @@ -5066,7 +5058,18 @@ static void init_sched_build_groups(struct sched_group groups[], cpumask_t span, | |||
| 5066 | #define MAX_DOMAIN_DISTANCE 32 | 5058 | #define MAX_DOMAIN_DISTANCE 32 |
| 5067 | 5059 | ||
| 5068 | static unsigned long long migration_cost[MAX_DOMAIN_DISTANCE] = | 5060 | static unsigned long long migration_cost[MAX_DOMAIN_DISTANCE] = |
| 5069 | { [ 0 ... MAX_DOMAIN_DISTANCE-1 ] = -1LL }; | 5061 | { [ 0 ... MAX_DOMAIN_DISTANCE-1 ] = |
| 5062 | /* | ||
| 5063 | * Architectures may override the migration cost and thus avoid | ||
| 5064 | * boot-time calibration. Unit is nanoseconds. Mostly useful for | ||
| 5065 | * virtualized hardware: | ||
| 5066 | */ | ||
| 5067 | #ifdef CONFIG_DEFAULT_MIGRATION_COST | ||
| 5068 | CONFIG_DEFAULT_MIGRATION_COST | ||
| 5069 | #else | ||
| 5070 | -1LL | ||
| 5071 | #endif | ||
| 5072 | }; | ||
| 5070 | 5073 | ||
| 5071 | /* | 5074 | /* |
| 5072 | * Allow override of migration cost - in units of microseconds. | 5075 | * Allow override of migration cost - in units of microseconds. |
