Linux block layer
 help / color / mirror / Atom feed
* [PATCH v2 0/2] null_blk: stop using page->private
@ 2026-11-26 21:23 Nilay Vaish
  2026-11-26 21:23 ` [PATCH v2 1/2] null_blk: convert the page stores to XArray Nilay Vaish
  2026-11-26 21:23 ` [PATCH v2 2/2] null_blk: stop storing the page index in page->private Nilay Vaish
  0 siblings, 2 replies; 3+ messages in thread
From: Nilay Vaish @ 2026-11-26 21:23 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, Bart Van Assche, linux-block, Nilay Vaish

null_blk records the index of each backing page in page->private. v1
only switched those accesses to the page_private() accessors. Christoph
pointed out that the index does not need to be stored at all: it is there
to work around radix_tree_gang_lookup(), which returns entries without
their indices.

So this version follows his suggestion instead. Patch 1 converts the two
page stores from radix trees to XArrays. Patch 2 takes the index from the
XArray iteration and stops storing it in the page. After the series
null_blk does not touch page->private.

Testing: a memory-backed device created through configfs, without and
with a 16 MiB cache, on next-20261125 with lockdep and atomic-sleep
debugging enabled. Write and read back 300 MiB, four parallel rewriters
followed by a flush, discard of a range (zeros there, neighbours intact),
an ext4 file copy with remount and fsck, then device removal. Same
results before the series, after patch 1 and after patch 2, with no
kernel warnings. The out-of-memory retry in null_insert_page() and zoned
devices were not exercised.

Changes since v1:
- Replace the accessor conversion with the XArray conversion and the
  removal of the stored index (Christoph).
- Bart's Reviewed-by is not carried over, since the patches are new.

v1: https://lore.kernel.org/r/20261124033630.832566-1-nilayvaish@google.com/

Nilay Vaish (2):
  null_blk: convert the page stores to XArray
  null_blk: stop storing the page index in page->private

 drivers/block/null_blk/main.c     | 146 +++++++++++++++---------------
 drivers/block/null_blk/null_blk.h |   4 +-
 2 files changed, 75 insertions(+), 75 deletions(-)


base-commit: 9437046953b2fb3bf55b36582450ea0267df82a7
-- 
2.56.1.839.g22a8290db9-goog


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

end of thread, other threads:[~2026-11-26 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 21:23 [PATCH v2 0/2] null_blk: stop using page->private Nilay Vaish
2026-11-26 21:23 ` [PATCH v2 1/2] null_blk: convert the page stores to XArray Nilay Vaish
2026-11-26 21:23 ` [PATCH v2 2/2] null_blk: stop storing the page index in page->private Nilay Vaish

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