aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_xarray.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <[email protected]>2024-02-27 20:15:48 +0000
committerAndrew Morton <[email protected]>2024-04-26 03:56:08 +0000
commitebb34f78d72c2320620ba6d55cb22a52949047a1 (patch)
tree6299d933d74b840b29aea3d2df535c64a55f4da2 /lib/test_xarray.c
parentmm/migrate: split source folio if it is on deferred split list (diff)
downloadkernel-ebb34f78d72c2320620ba6d55cb22a52949047a1.tar.gz
kernel-ebb34f78d72c2320620ba6d55cb22a52949047a1.zip
mm: convert folio_estimated_sharers() to folio_likely_mapped_shared()
Callers of folio_estimated_sharers() only care about "mapped shared vs. mapped exclusively", not the exact estimate of sharers. Let's consolidate and unify the condition users are checking. While at it clarify the semantics and extend the discussion on the fuzziness. Use the "likely mapped shared" terminology to better express what the (adjusted) function actually checks. Whether a partially-mappable folio is more likely to not be partially mapped than partially mapped is debatable. In the future, we might be able to improve our estimate for partially-mappable folios, though. Note that we will now consistently detect "mapped shared" only if the first subpage is actually mapped multiple times. When the first subpage is not mapped, we will consistently detect it as "mapped exclusively". This change should currently only affect the usage in madvise_free_pte_range() and queue_folios_pte_range() for large folios: if the first page was already unmapped, we would have skipped the folio. [[email protected]: folio_likely_mapped_shared() kerneldoc fixup] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: David Hildenbrand <[email protected]> Reviewed-by: Khalid Aziz <[email protected]> Acked-by: Barry Song <[email protected]> Reviewed-by: Vishal Moola (Oracle) <[email protected]> Reviewed-by: Ryan Roberts <[email protected]> Reviewed-by: Zi Yan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/test_xarray.c')
0 files changed, 0 insertions, 0 deletions