Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp583555pxb; Mon, 25 Apr 2022 17:16:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFIWsF4ZKrc7/LMo+ayyQFB/kEnWIijIWwkgHaWDavOsUYe8aPQQdHLealUgajdTpXsztY X-Received: by 2002:a05:6402:2142:b0:413:6531:bd9e with SMTP id bq2-20020a056402214200b004136531bd9emr21749712edb.5.1650932209842; Mon, 25 Apr 2022 17:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650932209; cv=none; d=google.com; s=arc-20160816; b=rosv54zQtZsES4bTo2vTcOBf5Kja+wuJ85bFyU/5nINsaIwJv+5pLOgXnfE5wq6kec bL6n5TmjSPrWxShbWrUrJdxpFh5mgRAqrspEHtXmjf+iYkd82TgNUT6XbFdz40vPdG+J Xi2Ut50uvAbtbPC+nFAdDEQGFSjvDQBzYqCEO32zXE3Z/MSYUnkdnYRgjlcylCt6MGYx jGWd5X+Nqqg+wnaL8WWj/tZkR7KGfh2wh4caIzt1HpA3PMoUjNC0K5EaxLE9rCp+uKHs 0iOMWYzNRgVaVoeEAVvKCQKgOJ0Gh9OJrBJn+6EZ2Eu8SqvMYAQSKxwLSz15F6JF11eX bP9w== 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=e/nSWGUN3FIAmeOGnERJTpavdH8S5PvkJMrvIlmos0A=; b=hl8AZYZKNI6RCEIzu7NrfyFrLa7YNHUxcyFHHUYsSC47Bb+rzBmruEB2ofV0Q6sMnp PnIF9ar9nv3hiBNLq6OGqOALRc6Ewo+nBd3VLV5mcjre97mHbTCA5pdhwYLVWczxWUai xTKDK0ecowNHpdaJd5nq47QJMpdlozZBJY0zcbmd1LBcUX5HK2vmhFzHRqhsptpNVkrb GgacX6G9NKphsqg4vjZcbdkPeEiGloKbigPak3X7NMSmxhjRTbX3tyF0E6yMxtKVSS07 4Vg7v7AElPEZ9+xMX9PP8Wvm1JBUTe7U29yzW3YdT1B/2a1G4mtnFtroDE26Cor6GGn3 mG6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=EUnNGTKs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz12-20020a0564021d4c00b00418c2b5bf04si17652527edb.486.2022.04.25.17.16.26; Mon, 25 Apr 2022 17:16:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=EUnNGTKs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240198AbiDYMdV (ORCPT + 99 others); Mon, 25 Apr 2022 08:33:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231655AbiDYMdS (ORCPT ); Mon, 25 Apr 2022 08:33:18 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC2B764731; Mon, 25 Apr 2022 05:30:14 -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=e/nSWGUN3FIAmeOGnERJTpavdH8S5PvkJMrvIlmos0A=; b=EUnNGTKsPcwlrnrm2PDN6Y/5Ae IAYZ0jEuutiZ9TSmOs3HZujZ2EhDcaB7xMcGaM3Z32Yvm77yKwh9Sc+aF8iphnrgVD3lH3FnCWJe2 bBNrqojxDAGwGUEyXW060fHziSPtDE3+meG0khkIxx8z1PoI8+xKB6xa+VjK1E8mMlJTuTLSV7vlU GnOfWEdG4+NBcLA66dKydOSJqwAaQXALOdDYQ2xQ91T6kCgzvv1rWkBF+y4YsqjfktHIHwx/LHK0T FGkEV+ByPiaJ1B6vFSXDK4/DigWFiq0+YGcyHScm7ykrfWrGWeQYTfDgJV3JUNZAR1++pi8Bu9gW0 e0ReSM9w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nixqz-008geI-66; Mon, 25 Apr 2022 12:30:09 +0000 Date: Mon, 25 Apr 2022 13:30:09 +0100 From: Matthew Wilcox To: David Howells Cc: linux-cachefs@redhat.com, Rohith Surabattula , Steve French , Shyam Prasad N , linux-cifs@vger.kernel.org, Jeff Layton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 14/14] mm, netfs, fscache: Stop read optimisation when folio removed from pagecache Message-ID: References: <164928615045.457102.10607899252434268982.stgit@warthog.procyon.org.uk> <164928630577.457102.8519251179327601178.stgit@warthog.procyon.org.uk> <469869.1649313707@warthog.procyon.org.uk> <3118843.1650888461@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3118843.1650888461@warthog.procyon.org.uk> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 25, 2022 at 01:07:41PM +0100, David Howells wrote: > Matthew Wilcox wrote: > > > OK. You suggested that releasepage was an acceptable place to call it. > > How about we have AS_RELEASE_ALL (... or something ...) and then > > page_has_private() becomes a bit more complicated ... to the point > > where we should probably get rid of it (by embedding it into > > filemap_release_folio(): > > I'm not sure page_has_private() is quite so easy to get rid of. > shrink_page_list() and collapse_file(), for example, use it to conditionalise > a call to try_to_release_page() plus some other bits. That's what I was saying. Make the calls to try_to_release_page() unconditional and delete page_has_private() because it only confuses people who should actually be using PagePrivate(). > I think that, for the moment, I would need to add a check for AS_RELEASE_ALL > to page_has_private(). > > David > >