Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xarray: free unused spare node after range creation
@ 2026-11-15  3:16 Andrew Morton
  2026-11-15  3:16 ` [PATCH 1/2] lib: xarray: free unused spare node in xas_create_range() Andrew Morton
  2026-11-15  3:16 ` [PATCH 2/2] lib/test_xarray: check unused spare node after range creation Andrew Morton
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Morton @ 2026-11-15  3:16 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle)
  Cc: linux-mm, Andrew Morton, Shardul Bankar, David Hildenbrand (ARM),
	Dev Jain, janak, Jinjiang Tu

xas_nomem() can leave a spare xa_node in an XA state when another user
populates the tree before xas_create_range() retries.  Free an unused
spare at the end of range creation, and add a deterministic lib/test_xarray
check for that path.  The fix is first and the test is second.

The test patch was held on both sides of a kernel A/B run while only the
fix was removed and restored.  Without the fix, its spare-node assertion
failed (158825705 of 158825706 checks passed).  With the fix, all
158825706 checks passed.  Both runs used the same verified guest test
script.

Shardul Bankar (1):
  lib: xarray: free unused spare node in xas_create_range()

Andrew Morton (1):
  lib/test_xarray: check unused spare node after range creation

 lib/test_xarray.c | 31 +++++++++++++++++++++++++++++++
 lib/xarray.c      |  7 ++++++-
 2 files changed, 37 insertions(+), 1 deletion(-)


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

end of thread, other threads:[~2026-11-15  3:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-15  3:16 [PATCH 0/2] xarray: free unused spare node after range creation Andrew Morton
2026-11-15  3:16 ` [PATCH 1/2] lib: xarray: free unused spare node in xas_create_range() Andrew Morton
2026-11-15  3:16 ` [PATCH 2/2] lib/test_xarray: check unused spare node after range creation Andrew Morton

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