[RFC PATCH 4/4] sched/numa: Don't update mm->numa_next_scan from fault path

From: Bharata B Rao
Date: Mon Oct 04 2021 - 06:57:39 EST


p->numa_scan_period is typically scaled up or down from
the fault path and mm->numa_next_scan is updated during
scanning from the task_work context using cmpxchg.

However there is one case where the scan period is increased
in the fault path, but mm->numa_next_scan

- is immediately updated and
- updated without using cmpxchg

Both of the above don't seem intended and hence remove
the updation of mm->numa_next_scan from the fault path
Updation should happen from task_work context subsequently.

Signed-off-by: Bharata B Rao <bharata@xxxxxxx>
---
kernel/sched/fair.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ceadb43e927b..3e420e73e265 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2180,9 +2180,6 @@ static void update_task_scan_period(struct task_struct *p,
p->numa_scan_period = min(p->numa_scan_period_max,
p->numa_scan_period << 1);

- p->mm->numa_next_scan = jiffies +
- msecs_to_jiffies(p->numa_scan_period);
-
return;
}

--
2.25.1