From: Nilay Vaish <nilayvaish@google.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@infradead.org>,
Bart Van Assche <bvanassche@acm.org>,
linux-block@vger.kernel.org, Nilay Vaish <nilayvaish@google.com>
Subject: [PATCH v2 0/2] null_blk: stop using page->private
Date: Thu, 26 Nov 2026 13:23:39 -0800 [thread overview]
Message-ID: <20261126212341.916839-1-nilayvaish@google.com> (raw)
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
next reply other threads:[~2026-11-26 21:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 21:23 Nilay Vaish [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126212341.916839-1-nilayvaish@google.com \
--to=nilayvaish@google.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox