diff options
Diffstat (limited to 'kernel/sched/core.c')
| -rw-r--r-- | kernel/sched/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index d11a1768357d..3c4d096544ce 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
| @@ -555,12 +555,15 @@ void resched_cpu(int cpu) | |||
| 555 | * selecting an idle cpu will add more delays to the timers than intended | 555 | * selecting an idle cpu will add more delays to the timers than intended |
| 556 | * (as that cpu's timer base may not be uptodate wrt jiffies etc). | 556 | * (as that cpu's timer base may not be uptodate wrt jiffies etc). |
| 557 | */ | 557 | */ |
| 558 | int get_nohz_timer_target(void) | 558 | int get_nohz_timer_target(int pinned) |
| 559 | { | 559 | { |
| 560 | int cpu = smp_processor_id(); | 560 | int cpu = smp_processor_id(); |
| 561 | int i; | 561 | int i; |
| 562 | struct sched_domain *sd; | 562 | struct sched_domain *sd; |
| 563 | 563 | ||
| 564 | if (pinned || !get_sysctl_timer_migration() || !idle_cpu(cpu)) | ||
| 565 | return cpu; | ||
| 566 | |||
| 564 | rcu_read_lock(); | 567 | rcu_read_lock(); |
| 565 | for_each_domain(cpu, sd) { | 568 | for_each_domain(cpu, sd) { |
| 566 | for_each_cpu(i, sched_domain_span(sd)) { | 569 | for_each_cpu(i, sched_domain_span(sd)) { |
