Thread (106 messages) 106 messages, 6 authors, 2022-01-08

Re: [PATCH 05/48] pagevec: Add folio_batch

From: Matthew Wilcox <willy@infradead.org>
Date: 2021-12-23 14:18:44
Also in: linux-fsdevel

On Wed, Dec 22, 2021 at 10:54:27PM -0800, Christoph Hellwig wrote:
On Wed, Dec 08, 2021 at 04:22:13AM +0000, Matthew Wilcox (Oracle) wrote:
quoted
+static inline void folio_batch_release(struct folio_batch *fbatch)
+{
+	pagevec_release((struct pagevec *)fbatch);
+}
+
+static inline void folio_batch_remove_exceptionals(struct folio_batch *fbatch)
+{
+	pagevec_remove_exceptionals((struct pagevec *)fbatch);
+}
I think these casts need documentation, both here and at the
struct folio_batch and struct pagevec definitions.

Alternatively I wonder if a union in stuct pagevec so that it can store
folios or pages might be the better option.
I tried that way first, but then the caller & callee need to agree
whether they're storing folios or pages in the pagevec.  And that's kind
of why we have types.

pagevec_remove_exceptionals() goes away by the end of this series.
pagevec_release() will take longer to remove.  What documentation
do you want to see?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help