mm: add FGP_UNCACHED folio creation flag
authorJens Axboe <axboe@kernel.dk>
Sat, 9 Nov 2024 17:03:01 +0000 (10:03 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 11 Nov 2024 23:35:20 +0000 (16:35 -0700)
commitadb32390b46465ddb96a4f1c2f71acf6dab3be5b
tree1196c10016721a0d3b97bc46a3be585bc2829282
parent428ed02f24da348ebcf6d8bc1048fb9979136a09
mm: add FGP_UNCACHED folio creation flag

Callers can pass this in for uncached folio creation, in which case if
a folio is newly created it gets marked as uncached. If a folio exists
for this index and lookup succeeds, then it will not get marked as
uncached. If an !uncached lookup finds a cached folio, clear the flag.
For that case, there are competeting uncached and cached users of the
folio, and it should not get pruned.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/pagemap.h
mm/filemap.c