Messages in this thread | | | From | Zi Yan <> | Subject | Re: [PATCH v1] mm: convert folio_estimated_sharers() to folio_likely_mapped_shared() | Date | Thu, 29 Feb 2024 10:28:50 -0500 |
| |
On 27 Feb 2024, at 15:15, David Hildenbrand wrote:
> 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. > > Cc: Barry Song <v-songbaohua@oppo.com> > Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com> > Cc: Ryan Roberts <ryan.roberts@arm.com> > Signed-off-by: David Hildenbrand <david@redhat.com> > --- LGTM. Thanks for the documentation. Reviewed-by: Zi Yan <ziy@nvidia.com>
-- Best Regards, Yan, Zi [unhandled content-type:application/pgp-signature] | |