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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 3FFB9C433B4 for ; Fri, 14 May 2021 12:11:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C8236143D for ; Fri, 14 May 2021 12:11:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233066AbhENMMo (ORCPT ); Fri, 14 May 2021 08:12:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:53088 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232862AbhENMMf (ORCPT ); Fri, 14 May 2021 08:12:35 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 84398AEBB; Fri, 14 May 2021 12:11:22 +0000 (UTC) Subject: Re: [PATCH v10 08/33] mm: Add folio_try_get_rcu To: "Matthew Wilcox (Oracle)" , akpm@linux-foundation.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210511214735.1836149-1-willy@infradead.org> <20210511214735.1836149-9-willy@infradead.org> From: Vlastimil Babka Message-ID: <64af9109-930e-7637-b3a9-aedd8dd617f4@suse.cz> Date: Fri, 14 May 2021 14:11:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210511214735.1836149-9-willy@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/11/21 11:47 PM, 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. > > Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Vlastimil Babka