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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <169477940797.27769.5804988700503210268.tip-bot2@tip-bot2>
Date:   Fri, 15 Sep 2023 12:03:27 -0000
From:   "tip-bot2 for Yury Norov" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Yury Norov <yury.norov@...il.com>, Ingo Molnar <mingo@...nel.org>,
        Mel Gorman <mgorman@...e.de>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: [tip: sched/core] sched/topology: Fix sched_numa_find_nth_cpu() in
 non-NUMA case

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     8ab63d418d4339d996f80d02a00dbce0aa3ff972
Gitweb:        https://git.kernel.org/tip/8ab63d418d4339d996f80d02a00dbce0aa3ff972
Author:        Yury Norov <yury.norov@...il.com>
AuthorDate:    Sat, 19 Aug 2023 07:12:36 -07:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Fri, 15 Sep 2023 13:48:10 +02:00

sched/topology: Fix sched_numa_find_nth_cpu() in non-NUMA case

When CONFIG_NUMA is enabled, sched_numa_find_nth_cpu() searches for a
CPU in sched_domains_numa_masks. The masks includes only online CPUs,
so effectively offline CPUs are skipped.

When CONFIG_NUMA is disabled, the fallback function should be consistent.

Fixes: cd7f55359c90 ("sched: add sched_numa_find_nth_cpu()")
Signed-off-by: Yury Norov <yury.norov@...il.com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: Mel Gorman <mgorman@...e.de>
Link: https://lore.kernel.org/r/20230819141239.287290-5-yury.norov@gmail.com
---
 include/linux/topology.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/topology.h b/include/linux/topology.h
index fea3237..52f5850 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -251,7 +251,7 @@ extern const struct cpumask *sched_numa_hop_mask(unsigned int node, unsigned int
 #else
 static __always_inline int sched_numa_find_nth_cpu(const struct cpumask *cpus, int cpu, int node)
 {
-	return cpumask_nth(cpu, cpus);
+	return cpumask_nth_and(cpu, cpus, cpu_online_mask);
 }
 
 static inline const struct cpumask *

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ