All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-mempolicy-protect-task-interleave-functions-with-tsk-mems_allowed_seq-fix.patch added to mm-unstable branch
@ 2024-02-06 20:15 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-02-06 20:15 UTC (permalink / raw)
  To: mm-commits, ying.huang, sthanneeru.opensrc, ravis.opensrc,
	rakie.kim, mhocko, hyeongtak.ji, honggyu.kim, Hasan.Maruf, hannes,
	gregory.price, dan.j.williams, corbet, gourry.memverge, akpm


The patch titled
     Subject: mm/mempolicy: weighted interleave checks wrong parameter
has been added to the -mm mm-unstable branch.  Its filename is
     mm-mempolicy-protect-task-interleave-functions-with-tsk-mems_allowed_seq-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mempolicy-protect-task-interleave-functions-with-tsk-mems_allowed_seq-fix.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Gregory Price <gourry.memverge@gmail.com>
Subject: mm/mempolicy: weighted interleave checks wrong parameter
Date: Tue, 6 Feb 2024 14:28:53 -0500

weighted interleave presently checks (!node) when it should check
(!il_weight).  This causes a wrong distribution of memory.

Link: https://lkml.kernel.org/r/20240206192853.3589-1-gregory.price@memverge.com
Signed-off-by: Gregory Price <gregory.price@memverge.com>
Reported-by: "Huang, Ying" <ying.huang@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Hasan Al Maruf <Hasan.Maruf@amd.com>
Cc: Honggyu Kim <honggyu.kim@sk.com>
Cc: Hyeongtak Ji <hyeongtak.ji@sk.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Rakie Kim <rakie.kim@sk.com>
Cc: Ravi Jonnalagadda <ravis.opensrc@micron.com>
Cc: Srinivasulu Thanneeru <sthanneeru.opensrc@micron.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mempolicy.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/mempolicy.c~mm-mempolicy-protect-task-interleave-functions-with-tsk-mems_allowed_seq-fix
+++ a/mm/mempolicy.c
@@ -1881,7 +1881,7 @@ retry:
 	/* 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;
_

Patches currently in -mm which might be from gourry.memverge@gmail.com are

mm-mempolicy-refactor-a-read-once-mechanism-into-a-function-for-re-use.patch
mm-mempolicy-introduce-mpol_weighted_interleave-for-weighted-interleaving.patch
mm-mempolicy-protect-task-interleave-functions-with-tsk-mems_allowed_seq.patch
mm-mempolicy-protect-task-interleave-functions-with-tsk-mems_allowed_seq-fix.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-06 20:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 20:15 + mm-mempolicy-protect-task-interleave-functions-with-tsk-mems_allowed_seq-fix.patch added to mm-unstable branch Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.