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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6F39C433F5 for ; Mon, 25 Apr 2022 12:30:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239162AbiDYMdV (ORCPT ); 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> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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 > >