Re: [PATCH v10 16/33] mm: Add folio_mapcount

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

 



On Tue, May 11, 2021 at 10:47:18PM +0100, Matthew Wilcox (Oracle) wrote:
> This is the folio equivalent of page_mapcount().
[...]
>  
> +/**
> + * folio_mapcount - The number of mappings of this folio.
> + * @folio: The folio.
> + *
> + * The result includes the number of times any of the pages in the
> + * folio are mapped to userspace.

I thought it did, but it doesn't.  It returns the number of times
the head/base page of this folio is mapped into userspace, which is not
a terribly useful concept.  I suspect this should call total_mapcount()
instead.  Looking through the complete set of patches, it's only used
in debugging code (unaccount_page_cache_page() and dump_page()).
I'm going to withdraw this patch from the next submission until I've
had the chance to think about it some more.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux