Re: Folio mapcount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 7/3/2023 9:24 PM, Zi Yan wrote:
> On 2 Jul 2023, at 21:09, Yin, Fengwei wrote:
> 
>> On 7/3/2023 3:51 AM, Zi Yan wrote:
>>>> (3) Mapcount of first (or any other) subpage (compount+subpage): for
>>>>     folio_estimated_sharers().
>>> This is another estimation. I wonder if we can use a different estimation
>>> like total_mapcount() > folio_nr_pages() instead.
>> Considering the partial folio mapping, I suppose we should use
>>    total_mapcount() > folio->_nr_pages_mapped
>> as folio_estimated_sharers().
> 
> What you propose is to get a precise check instead of estimate, and you assume no PMD mapping and still require per-page mapcount.
> 
> What I am proposing is to get rid of per-page mapcount, which is my goal, and use a single mapcount to do a rough estimate.
O. Sorry. I didn't notice your goal. So if the rough estimate is enough,
total_mapcount() > folio_nr_pages() works.

Do we need to check all the cases to make sure the rough estimation is
enough for all of them?


Regards
Yin, Fengwei

> 
> --
> Best Regards,
> Yan, Zi




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux