[PATCH] sched/numa: return earlier in task_numa_work()
From: Qi Zheng
Date: Tue May 28 2024 - 07:33:11 EST
When a new mm has been allocated, we can return directly after
initializing the mm->numa_next_scan to avoid redundant calling
of the time_before().
No functional change intended.
Signed-off-by: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>
---
kernel/sched/fair.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8a5b1ae0aa55..b78528a6312e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3228,6 +3228,7 @@ static void task_numa_work(struct callback_head *work)
if (!mm->numa_next_scan) {
mm->numa_next_scan = now +
msecs_to_jiffies(sysctl_numa_balancing_scan_delay);
+ return;
}
/*
--
2.20.1