diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cpu.c | 5 | ||||
-rw-r--r-- | kernel/sched_fair.c | 19 |
2 files changed, 14 insertions, 10 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index e202a68d1cc1..c977c339f559 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -349,6 +349,8 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen) | |||
349 | goto out_notify; | 349 | goto out_notify; |
350 | BUG_ON(!cpu_online(cpu)); | 350 | BUG_ON(!cpu_online(cpu)); |
351 | 351 | ||
352 | cpu_set(cpu, cpu_active_map); | ||
353 | |||
352 | /* Now call notifier in preparation. */ | 354 | /* Now call notifier in preparation. */ |
353 | raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu); | 355 | raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu); |
354 | 356 | ||
@@ -383,9 +385,6 @@ int __cpuinit cpu_up(unsigned int cpu) | |||
383 | 385 | ||
384 | err = _cpu_up(cpu, 0); | 386 | err = _cpu_up(cpu, 0); |
385 | 387 | ||
386 | if (cpu_online(cpu)) | ||
387 | cpu_set(cpu, cpu_active_map); | ||
388 | |||
389 | out: | 388 | out: |
390 | cpu_maps_update_done(); | 389 | cpu_maps_update_done(); |
391 | return err; | 390 | return err; |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 0fe94ea43f32..fb8994c6d4bb 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -1442,18 +1442,23 @@ __load_balance_iterator(struct cfs_rq *cfs_rq, struct list_head *next) | |||
1442 | struct task_struct *p = NULL; | 1442 | struct task_struct *p = NULL; |
1443 | struct sched_entity *se; | 1443 | struct sched_entity *se; |
1444 | 1444 | ||
1445 | while (next != &cfs_rq->tasks) { | 1445 | if (next == &cfs_rq->tasks) |
1446 | return NULL; | ||
1447 | |||
1448 | /* Skip over entities that are not tasks */ | ||
1449 | do { | ||
1446 | se = list_entry(next, struct sched_entity, group_node); | 1450 | se = list_entry(next, struct sched_entity, group_node); |
1447 | next = next->next; | 1451 | next = next->next; |
1452 | } while (next != &cfs_rq->tasks && !entity_is_task(se)); | ||
1448 | 1453 | ||
1449 | /* Skip over entities that are not tasks */ | 1454 | if (next == &cfs_rq->tasks) |
1450 | if (entity_is_task(se)) { | 1455 | return NULL; |
1451 | p = task_of(se); | ||
1452 | break; | ||
1453 | } | ||
1454 | } | ||
1455 | 1456 | ||
1456 | cfs_rq->balance_iterator = next; | 1457 | cfs_rq->balance_iterator = next; |
1458 | |||
1459 | if (entity_is_task(se)) | ||
1460 | p = task_of(se); | ||
1461 | |||
1457 | return p; | 1462 | return p; |
1458 | } | 1463 | } |
1459 | 1464 | ||