diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/fair.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index f84ac3fb581b..de9b4d8eb853 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
| @@ -1016,8 +1016,16 @@ static void numa_migrate_preferred(struct task_struct *p) | |||
| 1016 | { | 1016 | { |
| 1017 | /* Success if task is already running on preferred CPU */ | 1017 | /* Success if task is already running on preferred CPU */ |
| 1018 | p->numa_migrate_retry = 0; | 1018 | p->numa_migrate_retry = 0; |
| 1019 | if (cpu_to_node(task_cpu(p)) == p->numa_preferred_nid) | 1019 | if (cpu_to_node(task_cpu(p)) == p->numa_preferred_nid) { |
| 1020 | /* | ||
| 1021 | * If migration is temporarily disabled due to a task migration | ||
| 1022 | * then re-enable it now as the task is running on its | ||
| 1023 | * preferred node and memory should migrate locally | ||
| 1024 | */ | ||
| 1025 | if (!p->numa_migrate_seq) | ||
| 1026 | p->numa_migrate_seq++; | ||
| 1020 | return; | 1027 | return; |
| 1028 | } | ||
| 1021 | 1029 | ||
| 1022 | /* This task has no NUMA fault statistics yet */ | 1030 | /* This task has no NUMA fault statistics yet */ |
| 1023 | if (unlikely(p->numa_preferred_nid == -1)) | 1031 | if (unlikely(p->numa_preferred_nid == -1)) |
