* [PATCH] mm/mempolicy: weighted interleave checks wrong parameter
@ 2024-02-06 19:28 Gregory Price
0 siblings, 0 replies; only message in thread
From: Gregory Price @ 2024-02-06 19:28 UTC (permalink / raw)
To: linux-mm; +Cc: akpm, ying.huang, Gregory Price
Hi Andrew,
Can you add this hotfix to d866f3b594ce3324947fef017bbbec1f4eb237ea on
linux-next? This was reported after you picked up the patch line.
Can probably be squashed, wasn't worth a full version.
~Gregory
---
weighted interleave presently checks (!node) when it should check
(!il_weight). This causes a wrong distribution of memory.
Reported-by: "Huang, Ying" <ying.huang@intel.com>
Signed-off-by: Gregory Price <gregory.price@memverge.com>
---
mm/mempolicy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index ed0d5d2d456a..ba0b2b81bd08 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1885,7 +1885,7 @@ static unsigned int weighted_interleave_nodes(struct mempolicy *policy)
/* to prevent miscount use tsk->mems_allowed_seq to detect rebind */
cpuset_mems_cookie = read_mems_allowed_begin();
node = current->il_prev;
- if (!node || !node_isset(node, policy->nodes)) {
+ if (!current->il_weight || !node_isset(node, policy->nodes)) {
node = next_node_in(node, policy->nodes);
if (read_mems_allowed_retry(cpuset_mems_cookie))
goto retry;
--
2.39.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-06 19:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06 19:28 [PATCH] mm/mempolicy: weighted interleave checks wrong parameter Gregory Price
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox