lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240528113024.92864-1-zhengqi.arch@bytedance.com>
Date: Tue, 28 May 2024 19:30:24 +0800
From: Qi Zheng <zhengqi.arch@...edance.com>
To: mgorman@...e.de,
	peterz@...radead.org,
	mingo@...hat.com
Cc: linux-kernel@...r.kernel.org,
	Qi Zheng <zhengqi.arch@...edance.com>
Subject: [PATCH] sched/numa: return earlier in task_numa_work()

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@...edance.com>
---
 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ