Thread (96 messages) 96 messages, 6 authors, 2021-06-08

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

From: Matthew Wilcox <willy@infradead.org>
Date: 2021-05-18 18:46:24
Also in: linux-fsdevel, lkml

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.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help