The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] sched/numa: Reset NUMA fault locality after scan period update
@ 2026-08-02 11:30 Eric Kim
  2026-08-03  7:10 ` Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Kim @ 2026-08-02 11:30 UTC (permalink / raw)
  To: peterz
  Cc: mingo, juri.lelli, vincent.guittot, linux-kernel, Eric Kim,
	Binwon Song

When updating the task scan period for NUMA locality checks,
update_task_scan_period should increase the scan periods
either when there were no faults or when there is a failed migration
attempt. However, numa_faults_locality which is used to check for
migration failure and number of faults is not cleared when it is in
this state, causing stale migration and fault information to affect
later decisions.

clear numa_faults_locality after updating the scan period so that
at each update it uses newly collected information.

Reported-by: Binwon Song <qlsdnjs236@chungbuk.ac.kr>
Link: https://lore.kernel.org/all/20250404095354.311156-1-qlsdnjs236@chungbuk.ac.kr/
Signed-off-by: Eric Kim <seohyun.kim@outlook.kr>
---
 kernel/sched/fair.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d78467ec6ee13..2ac1ef9ad63bd 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3469,6 +3469,8 @@ static void update_task_scan_period(struct task_struct *p,
 		p->mm->numa_next_scan = jiffies +
 			msecs_to_jiffies(p->numa_scan_period);
 
+		memset(p->numa_faults_locality, 0,
+		       sizeof(p->numa_faults_locality));
 		return;
 	}
 
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-03  7:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-02 11:30 [PATCH] sched/numa: Reset NUMA fault locality after scan period update Eric Kim
2026-08-03  7:10 ` Peter Zijlstra
2026-08-03  7:47   ` Eric Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox