From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E721C4743D for ; Sun, 6 Jun 2021 14:14:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B1F8161420 for ; Sun, 6 Jun 2021 14:14:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1F8161420 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EC7726B006C; Sun, 6 Jun 2021 10:14:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E77156B006E; Sun, 6 Jun 2021 10:14:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D3F626B0070; Sun, 6 Jun 2021 10:14:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id A2DDC6B006C for ; Sun, 6 Jun 2021 10:14:12 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4BCFE8249980 for ; Sun, 6 Jun 2021 14:14:12 +0000 (UTC) X-FDA: 78223493544.29.67C04D4 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf27.hostedemail.com (Postfix) with ESMTP id 5BEF480192EE for ; Sun, 6 Jun 2021 14:14:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=tnxs2YjjeULJjYGX8rw24Ya3I/595FxFYvh2Ucj44wg=; b=ohqxNgljMMWf4rGHBLqed8U4TK aamqngWDDwb5RSH1wSeFe4yMf05jx0WsgrfEOMNqYk9HWUAH3/jusymOKwa1Rlho34kQrLCl1wVMU F7HNu0iPn+0SkvTIQlbA6ETJl0LuzGtcNZORnyE3NhQUk0cw/cLB11ina9Pk26i3ebQo/QJQm4RsS lUcrrhGa1VvqrGz5FuN32enwWzpxhniv9+QpKggpoHg62pB9T5qRpa68QCTgfnSLmQZvi4huvpNjS BDhZphWW1GS8doH49k/RxUMxaSAz1MD4g25svFeH3Jq8Og0uRJg+VGLTQ3BYwl+VCn3IIoRGbi81J yvEuB+fQ==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lptXD-00Et44-D0; Sun, 06 Jun 2021 14:13:53 +0000 Date: Sun, 6 Jun 2021 15:13:51 +0100 From: Christoph Hellwig To: Matthew Wilcox Cc: Christoph Hellwig , akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v10 08/33] mm: Add folio_try_get_rcu Message-ID: References: <20210511214735.1836149-1-willy@infradead.org> <20210511214735.1836149-9-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5BEF480192EE X-Stat-Signature: xsodo4eco13sdy1gsyorkytd7gw4gi3m Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=ohqxNglj; dmarc=none; spf=none (imf27.hostedemail.com: domain of BATV@casper.srs.infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=BATV@casper.srs.infradead.org X-HE-Tag: 1622988849-251859 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.