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>
Thu, 14 Nov 2024 14:15:19 +0000 (07:15 -0700)
commitbce05b335c1221d1a9be84bed4fccbae9e1e8d8d
tree40c4884f936008cdf249d7ea5a22883889676c07
parent11eb92691f175883e92cf0b271450cd338ee1d75
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