mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mm/mempolicy: failed to disable numa balancing
@ 2022-12-02 14:16 tzm
  2022-12-02 19:59 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: tzm @ 2022-12-02 14:16 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, tzm

It will be failed to  disable numa balancing policy permanently by passing
<numa_balancing=disable> to boot cmdline parameters.
The numabalancing_override variable is int and 1 for enable -1 for disable.
So, !enumabalancing_override will always be true, which cause this bug.

Signed-off-by: tzm <tcm1030@163.com>
---
 mm/mempolicy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 61aa9aedb728..2789c0920293 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2865,7 +2865,7 @@ static void __init check_numabalancing_enable(void)
 	if (numabalancing_override)
 		set_numabalancing_state(numabalancing_override == 1);
 
-	if (num_online_nodes() > 1 && !numabalancing_override) {
+	if (num_online_nodes() > 1 && (numabalancing_override == 1)) {
 		pr_info("%s automatic NUMA balancing. Configure with numa_balancing= or the kernel.numa_balancing sysctl\n",
 			numabalancing_default ? "Enabling" : "Disabling");
 		set_numabalancing_state(numabalancing_default);
-- 
2.27.0


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

end of thread, other threads:[~2022-12-16 10:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-02 14:16 [PATCH] mm/mempolicy: failed to disable numa balancing tzm
2022-12-02 19:59 ` Andrew Morton
2022-12-03  3:44   ` Mina Almasry
2022-12-04 22:58   ` Yu Zhao
2022-12-16 10:46   ` Mel Gorman

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

all inboxes | Powered by JetHome®