Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2589853pxj; Sun, 6 Jun 2021 07:15:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws3xPcv5khzxQWLw9R4NzgWNA4t927FAGMuKTFUd9W+Ptz1nAx9CyLH+/5z/j/MWU4Mhcm X-Received: by 2002:a05:6402:2049:: with SMTP id bc9mr15489523edb.298.1622988939097; Sun, 06 Jun 2021 07:15:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622988939; cv=none; d=google.com; s=arc-20160816; b=KQ6vXRQz9nMEncVCbZpVzQHsoWox6iB1De12qaHlxxN1ugXIt2iCXgmFBzZ+oN9fl5 qsqQZhFqCTZrwg4r+/DXCTbCLFCFEFoE29OLZRuULsVCLbByO7D5aSNbZb05Tqlz4vzt wbaHjEyEerjGvAaUOIlX8hAXAgEMobcuoDC5jb8lt9kfo5p8NAbWh3GFX2jlk5GHAi6n h9774sZgEE/3EQE8UdAOxaC3DLWxwLz0P9haCz2/xMEq6IWfDCUQFRu1D8xCqW39mKoW 4kQ25+yVK3JRrrQxhKv34fuTFGlmWeleGLxWQA+QwJwuzNGdzghI3telH9s/gCGa3/Mr Tygw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tnxs2YjjeULJjYGX8rw24Ya3I/595FxFYvh2Ucj44wg=; b=Xeo/EmijqtKF4bXACdEf/0Fr70lmReUOawesR9RsMLQVbbvcUAVnGp73YEJe0ZOUjv 8ID3po2bzJVsW09C9mkI7hSnufXoW8CU91YxvZiJ6J5mhZv56KmrAfjJhyNsPC4z+Unq 0Ou4PJMUJkoRj2RmmAdxLhNm3D9l3yzYyt7C9VAWWnx+qoGeJR3UzcWHZg7yrqmCJR35 m5l/y2R0K7HNCH+hOkvqp94xaetbsgTfbG7NvfdBcv+ODT/pRQeQsTc70jK/1LMdrOnz zf8rr8edePQkpmlm6RWTpgn8A6bSP8grqW+LSxH1395udnsqpBGgz9QlQqGcM2GCRV4v 7PIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ohqxNglj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si1043200eds.276.2021.06.06.07.15.14; Sun, 06 Jun 2021 07:15:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ohqxNglj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230088AbhFFOQA (ORCPT + 99 others); Sun, 6 Jun 2021 10:16:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230003AbhFFOP7 (ORCPT ); Sun, 6 Jun 2021 10:15:59 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A7ABC061766; Sun, 6 Jun 2021 07:14:09 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.