[PATCH 0/2] mtd: rawnand: nandsim: stop pre-populating the cache file's page cache
Tal Zussman
tz2294 at columbia.edu
Wed Oct 14 20:24:57 PDT 2026
nandsim runs its cache file I/O under PF_MEMALLOC and pre-populates
the page cache before each access, both to get NOFS allocation out of
kernel_read() and kernel_write(). Use memalloc_nofs_save() for that
instead and remove the pre-population. The pre-population is the
driver's only struct page usage and one of the last users of
find_get_page() and find_or_create_page().
Tested on KVM using the MTD test modules, nandtest, and fsx/fsstress on
UBIFS over a nandsim cache file, with no errors and a 6-13% speedup in
mtd_speedtest.
---
Tal Zussman (2):
mtd: rawnand: nandsim: use a NOFS scope for cache file I/O
mtd: rawnand: nandsim: stop pre-populating the cache file's page cache
drivers/mtd/nand/raw/nandsim.c | 85 +++++++-----------------------------------
1 file changed, 14 insertions(+), 71 deletions(-)
---
base-commit: 30daaf3e7897b4a8d9b72e5b0c86dd6e2a4d7d85
change-id: 20261012-nandsim-nofs-8f3ae982181e
Best regards,
--
Tal Zussman <tz2294 at columbia.edu>
More information about the linux-mtd
mailing list