* + mm-huge_memory-fix-a-folio_split-race-condition-with-folio_try_get-fix.patch added to mm-hotfixes-unstable branch
@ 2026-03-04 1:10 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-03-04 1:10 UTC (permalink / raw)
To: mm-commits, david, ziy, akpm
The patch titled
Subject: mm-huge_memory-fix-a-folio_split-race-condition-with-folio_try_get-fix
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-huge_memory-fix-a-folio_split-race-condition-with-folio_try_get-fix.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-huge_memory-fix-a-folio_split-race-condition-with-folio_try_get-fix.patch
This patch will later appear in the mm-hotfixes-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 various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Zi Yan <ziy@nvidia.com>
Subject: mm-huge_memory-fix-a-folio_split-race-condition-with-folio_try_get-fix
Date: Tue, 3 Mar 2026 11:26:41 -0500
move comment, per David
Link: https://lkml.kernel.org/r/5C9FA053-A4C6-4615-BE05-74E47A6462B3@nvidia.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Cc: David Hildenbrand <david@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/huge_memory.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
--- a/mm/huge_memory.c~mm-huge_memory-fix-a-folio_split-race-condition-with-folio_try_get-fix
+++ a/mm/huge_memory.c
@@ -3656,17 +3656,15 @@ static int __split_unmapped_folio(struct
* uniform split has xas_split_alloc() called before
* irq is disabled to allocate enough memory, whereas
* non-uniform split can handle ENOMEM.
+ * Use the to-be-split folio, so that a parallel
+ * folio_try_get() waits on it until xarray is updated
+ * with after-split folios and the original one is
+ * unfrozen.
*/
if (split_type == SPLIT_TYPE_UNIFORM) {
xas_split(xas, old_folio, old_order);
} else {
xas_set_order(xas, folio->index, split_order);
- /*
- * use the to-be-split folio, so that a parallel
- * folio_try_get() waits on it until xarray is
- * updated with after-split folios and
- * the original one is unfrozen.
- */
xas_try_split(xas, old_folio, old_order);
if (xas_error(xas))
return xas_error(xas);
_
Patches currently in -mm which might be from ziy@nvidia.com are
mm-cma-move-put_page_testzero-out-of-vm_warn_on-in-cma_release.patch
mm-huge_memory-fix-a-folio_split-race-condition-with-folio_try_get.patch
mm-huge_memory-fix-a-folio_split-race-condition-with-folio_try_get-fix.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-04 1:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 1:10 + mm-huge_memory-fix-a-folio_split-race-condition-with-folio_try_get-fix.patch added to mm-hotfixes-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.