aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMel Gorman <[email protected]>2022-05-20 11:35:16 +0100
committerPeter Zijlstra <[email protected]>2022-06-13 10:29:59 +0200
commit70ce3ea9aa4ed901c8a90de667df5ef307766e71 (patch)
treec44a8d0d33c9fd2bd4ffeba19c1c9008dda0cace
parentb13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3 (diff)
sched/numa: Initialise numa_migrate_retry
On clone, numa_migrate_retry is inherited from the parent which means that the first NUMA placement of a task is non-deterministic. This affects when load balancing recognises numa tasks and whether to migrate "regular", "remote" or "all" tasks between NUMA scheduler domains. Signed-off-by: Mel Gorman <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Tested-by: K Prateek Nayak <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--kernel/sched/fair.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 77b2048a9326..51836efe5931 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2885,6 +2885,7 @@ void init_numa_balancing(unsigned long clone_flags, struct task_struct *p)
p->node_stamp = 0;
p->numa_scan_seq = mm ? mm->numa_scan_seq : 0;
p->numa_scan_period = sysctl_numa_balancing_scan_delay;
+ p->numa_migrate_retry = 0;
/* Protect against double add, see task_tick_numa and task_numa_work */
p->numa_work.next = &p->numa_work;
p->numa_faults = NULL;