Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp199889pxb; Mon, 25 Apr 2022 08:25:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGneXd/50ZVksz07+lVkg4pcugrwJezyrtt6s/Gk5Ur5KaQ69Mz/lhLHlMT9C7Xkk+GJ+i X-Received: by 2002:a62:6dc3:0:b0:505:895a:d38b with SMTP id i186-20020a626dc3000000b00505895ad38bmr19610458pfc.7.1650900306960; Mon, 25 Apr 2022 08:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650900306; cv=none; d=google.com; s=arc-20160816; b=IVfp9/jl4HB884SEqz3azYEviNoKaFj/mn3FdCILe1QD0mKzR1E8b4O8vEFTBj3JlW lwyYyIVzxy782aKDojUfRnbZLOHf36357Ft3G4tkj9Dp6AEhvnyjO2P2tQhswUo4/JlO JdpIh6C3HFqgYuKQpjteuMK3DbcoooN6e27uigCFbe0l9L9blxS18Z3QBT/GT+5kuoXt 8KH5aR8ja2/sZVOUzOhYZ1ikAIWCUXa+kXm1Q/28oBTyXGSOccpVViWFKw6mf9wy/ki3 4Lhu9aUcCt2whahYeA/re+vhdHonc3BUu3cEuWKLBSpolhwzDyCAyQynmWuyeH5boYQ7 hR3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=3I28rQJDnhHxMtAGkz1SevfRVOxy1YWGVvIDo5VbNQY=; b=q4SrmdUsxCqQVSu4iz1DuGIS6L/bq8lCEzpaK9xW3tHo7tQ5dQXN6qomZkJy2e484s TEnuUQJeW+YLZT5Vs6uyq+s9+x8jl+TVrQ78s17fzeMCwkFS/T2gDRAH1leh914G127P eSOpwxyfxEotfPG8h47g/CAkhtaPMDOKZTkREMP10Ou2Ay/2Alg/WvKD3AMR+xImLhJc gpGInIw9HQks0j/BgYng2ur8T7/SAqh4svDCvoapv+f0QIJgCKgmbJxDZOppjrO5OYUO 1aOXcyOjHXvMSa5NedtHO1Bd1aYLSvXzvhKRJyaHMybAv2RaWL3Wl3+xcLyft5Bv5qxV p5xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X9w6Cl6q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020a170903230d00b001588178e78dsi2979225plh.173.2022.04.25.08.24.49; Mon, 25 Apr 2022 08:25:06 -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=@redhat.com header.s=mimecast20190719 header.b=X9w6Cl6q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232440AbiDYMLN (ORCPT + 99 others); Mon, 25 Apr 2022 08:11:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232495AbiDYMLC (ORCPT ); Mon, 25 Apr 2022 08:11:02 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9305F580C2 for ; Mon, 25 Apr 2022 05:07:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650888477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3I28rQJDnhHxMtAGkz1SevfRVOxy1YWGVvIDo5VbNQY=; b=X9w6Cl6qSOLz38Ul2YXC2RPhMArsTITZrk9axM+3E1Pwc0BgGc3EExCm9a+C3+JFJtbVjf OWb8S+GU4kl/9m/fOaRUhi3qk8taMghhI31sppqTr3mMAvsbsTAApsq8DzD+k8K4r6Hbn9 mfYLuJ3i4m9nnNoaJ9Lv+BO19ZOq6MA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-6-OAw2PWF8O5CZiGHgMX8hCw-1; Mon, 25 Apr 2022 08:07:56 -0400 X-MC-Unique: OAw2PWF8O5CZiGHgMX8hCw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A3EC580005D; Mon, 25 Apr 2022 12:07:55 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2AB599E71; Mon, 25 Apr 2022 12:07:42 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <164928615045.457102.10607899252434268982.stgit@warthog.procyon.org.uk> <164928630577.457102.8519251179327601178.stgit@warthog.procyon.org.uk> <469869.1649313707@warthog.procyon.org.uk> To: Matthew Wilcox Cc: dhowells@redhat.com, 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 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3118842.1650888461.1@warthog.procyon.org.uk> Date: Mon, 25 Apr 2022 13:07:41 +0100 Message-ID: <3118843.1650888461@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, 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 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. I think that, for the moment, I would need to add a check for AS_RELEASE_ALL to page_has_private(). David