lkml.org 
[lkml]   [2021]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v10 08/33] mm: Add folio_try_get_rcu
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:
> > On Tue, May 11, 2021 at 10:47:10PM +0100, Matthew Wilcox (Oracle) wrote:
> > > +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.

> > 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.

\
 
 \ /
  Last update: 2021-06-06 16:15    [W:0.099 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site