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

Re: [PATCH v10 08/33] mm: Add folio_try_get_rcu

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-06-06 14:14:12
Also in: linux-fsdevel, lkml

On Sat, Jun 05, 2021 at 05:26:59AM +0100, Matthew Wilcox wrote:
On Thu, May 27, 2021 at 09:16:42AM +0100, Christoph Hellwig wrote:
quoted
On Tue, May 11, 2021 at 10:47:10PM +0100, Matthew Wilcox (Oracle) wrote:
quoted
+static inline bool folio_ref_try_add_rcu(struct folio *folio, int count)
Should this have a __ prefix and/or a don't use direct comment?
I think it will get used directly ... its page counterpart is:

mm/gup.c:       if (unlikely(!page_cache_add_speculative(head, refs)))

I deliberately left kernel-doc off this function so it's not described,
but described folio_try_get_rcu() in excruciating detail.  I hope that's
enough.  There's no comment on page_cache_add_speculative() today, so
again, we're status quo.
Ok.  Seems a little weird, but so does much in this area.
quoted
Is this really a good place for the comment?  I'd expect it either near
a relevant function or at the top of a file.
It's right before mapping_get_entry() which is the main lookup function
for the page cache, so I think it meets your first criteria?
I guess it does, yes.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help