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>
Wed, 20 Nov 2024 14:32:31 +0000 (07:32 -0700)
commitd3b97be763199839837bf5916bf4c76647fca332
treebe428572cf6d3a93f862a0d12386e0cc8ab864cc
parentb041d4c11b59772e563841c727a6c05e2bb7f408
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