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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 99AACC48BE8 for ; Tue, 15 Jun 2021 06:26:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 38AD3613FA for ; Tue, 15 Jun 2021 06:26:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38AD3613FA 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 CADF96B006E; Tue, 15 Jun 2021 02:26:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C84916B0070; Tue, 15 Jun 2021 02:26:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B74156B0071; Tue, 15 Jun 2021 02:26:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0093.hostedemail.com [216.40.44.93]) by kanga.kvack.org (Postfix) with ESMTP id 876436B006E for ; Tue, 15 Jun 2021 02:26:26 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 2EEA8180AD804 for ; Tue, 15 Jun 2021 06:26:26 +0000 (UTC) X-FDA: 78254973972.35.2B46CF0 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf10.hostedemail.com (Postfix) with ESMTP id 3CA3841449E4 for ; Tue, 15 Jun 2021 06:26:16 +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=xD+8OyCC8jit/aO3eSCpd00pyVmVHLw7NkSiMk3zXxA=; b=Xj3bpVv8EqGZQLC/9byslmfD3k OSI63tSYCY0QFyoi5we++yY1diRNQkR0oRQ18iCZt35QKMeN5zzMJPOl0HGVSeJ6XPKdxEntBLsyK Tu2OOBvROdhE+e336DCBnXFHWZXcso/j20WFgD5TDv1piUTtThP7VIHxMH6OXN31xCuq3G06kdRSo 7AHLz6EK3N2x+ZmsT+5Yd+g8BwTt3cqtUOEK5bguul5MMi2IOf/w6IcgtONFUUlkT7MbkWPWnWKj2 02SYHMvZZ4kExqJtLa8in5kVJkaf+smpzEsrcdryLdPlrmz2zuHPXcLG+sev9HrYgGaCCRwk2pWJB 6T1iOSsQ==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lt2WN-006AEL-90; Tue, 15 Jun 2021 06:26:03 +0000 Date: Tue, 15 Jun 2021 07:25:59 +0100 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vlastimil Babka , William Kucharski Subject: Re: [PATCH v11 09/33] mm: Add folio_try_get_rcu() Message-ID: References: <20210614201435.1379188-1-willy@infradead.org> <20210614201435.1379188-10-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210614201435.1379188-10-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Xj3bpVv8; spf=none (imf10.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; dmarc=none X-Stat-Signature: z8jbenrwxh5is9cazhhrjnt388rmspi7 X-Rspamd-Queue-Id: 3CA3841449E4 X-Rspamd-Server: rspam06 X-HE-Tag: 1623738376-377195 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jun 14, 2021 at 09:14:11PM +0100, Matthew Wilcox (Oracle) wrote: > This is the equivalent of page_cache_get_speculative(). Also add > folio_ref_try_add_rcu (the equivalent of page_cache_add_speculative) > and folio_get_unless_zero() (the equivalent of get_page_unless_zero()). > > The new kernel-doc attempts to explain from the user's point of view > when to use folio_try_get_rcu() and when to use folio_get_unless_zero(), > because there seems to be some confusion currently between the users of > page_cache_get_speculative() and get_page_unless_zero(). > > Reimplement page_cache_add_speculative() and page_cache_get_speculative() > as wrappers around the folio equivalents, but leave get_page_unless_zero() > alone for now. This commit reduces text size by 3 bytes due to slightly > different register allocation & instruction selections. > > Signed-off-by: Matthew Wilcox (Oracle) > Acked-by: Vlastimil Babka > Reviewed-by: William Kucharski Looks good: Reviewed-by: Christoph Hellwig