Re: [PATCH 05/48] pagevec: Add folio_batch
From: Christoph Hellwig <hch@infradead.org>
Date: 2021-12-24 06:13:53
Also in:
linux-fsdevel
From: Christoph Hellwig <hch@infradead.org>
Date: 2021-12-24 06:13:53
Also in:
linux-fsdevel
On Thu, Dec 23, 2021 at 02:18:40PM +0000, Matthew Wilcox wrote:
quoted
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?
Mostly comments at the pagevec and folio_batch definitions that they need to match because of these two functions, and then maybe a backreference from the casts to the definitions.