Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp49663pxb; Wed, 30 Mar 2022 22:43:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+NNdEmfgi1GDNSigrkIEL3RERTavIgVMA/bGNLlmMU09hWLwJKYVtdE0r3FZ1oQagWtv3 X-Received: by 2002:a63:83c8:0:b0:398:7ea3:f71b with SMTP id h191-20020a6383c8000000b003987ea3f71bmr8984267pge.484.1648705424649; Wed, 30 Mar 2022 22:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648705424; cv=none; d=google.com; s=arc-20160816; b=QA7YOcDq/j3WrsyZgJffon/p/HuKYZuhrZAqpmdLO8h+OVEFD/e7edeFeVMuOdQv5o Ak9hCdhz5CNLG9KyJkHgU3ggGxovUIzRP5FVjf8i07o1Kq7DM8TBqIWZLSo34724qQdj xfTym6umHv8vpoQj40Y56tTuwRO+KIHSO4jHpR5Z7fwO7XyXIAaWIvWZh8WiWRHIiVQE QECs8LpdyJY9b7wJyxlz0y9hHa5wNRQKHlT5WEEm+jH4YQ/ofMG9wXurBUA9mBEEZkXD //i3fQtuPZsR+5uuVf7kn44fyyfpYvKTZYcMeW2QBxYSI9nRMoWMzwf8lJFsIQ9eEo1t TKYA== 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=ANbvzWQvNfeYGzbiD6/wAHprXWq1t02+UVc9tNIiwuE=; b=zgQDoOxKmny/VzbS/KbcSAqj6Kh+i2vhTf83Zln/tU4GMcY4E3ZQb4KTmPNDO7SqK5 uGMQkmP4N+GUUAbfXHunope9X2BlL1SwQMYvG2S6OLP+SOErht0UmjshwIU8XIO9KdVk RT7VTa/ZehWrh7Y5vy36PDYb/qSUOxjTOtBxepuyrgQ+L0dPhBPEJXFb5mYT2HrWLkxB 7JpzlmuDhQN4I2FiofL73uVeK2M/YG4GKHSgtQJbs1kPVYUTEG2A9dfKlEexsdvx9FlL 5gvo+Nnb1b0OhFpGLCAef3Su9P0K/xAJQ7Bu0uo4vNPtNlPhzFYdamKC/6cpuJjxIej1 1CNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=GBcRpXtr; 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 x1-20020a1709028ec100b00153b2d16593si22319301plo.411.2022.03.30.22.43.30; Wed, 30 Mar 2022 22:43:44 -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=bombadil.20210309 header.b=GBcRpXtr; 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 S229694AbiCaFR2 (ORCPT + 99 others); Thu, 31 Mar 2022 01:17:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbiCaFRW (ORCPT ); Thu, 31 Mar 2022 01:17:22 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3575583B6; Wed, 30 Mar 2022 22:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=ANbvzWQvNfeYGzbiD6/wAHprXWq1t02+UVc9tNIiwuE=; b=GBcRpXtrNAx16DMpK/U8n2u2M6 AQdUlOHOggVT3wpCHBTXFRuoAGvKRODSIznxL+Rk7nghPzyDcx0YT9jb+iYraZ4/lwq3OkRPI74V2 uHfsJdtR1vCqHcxQvHh3puTDNtUNgmUfWEpdsRQsDS1s8L1Us7H5PHtPVsqBaa7167TDKGmEhRY2R ICJ2D4GnQaBnF//FX8TXXQCQkM2dGsTILllaumqImHph7s7e4hIlQcY7KZN05zgh9iNt2swXKcq/O +U9oFtK8QQAzP2ECMvuUYFYCtHmZcXjVvOgf2/51Z1RABS5ylPmjt2eL3h0godRT3V4+XBQhJ2c8N kV4GZV0A==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZn9g-000gCh-LL; Thu, 31 Mar 2022 05:15:32 +0000 Date: Wed, 30 Mar 2022 22:15:32 -0700 From: Christoph Hellwig To: Johannes Weiner Cc: Christoph Hellwig , CGEL , axboe@kernel.dk, viro@zeniv.linux.org.uk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org, Yang Yang , Ran Xiaokai Subject: Re: [PATCH] block/psi: make PSI annotations of submit_bio only work for file pages Message-ID: References: <623938d1.1c69fb81.52716.030f@mx.google.com> <20220323061058.GA2343452@cgel.zte@gmail.com> <62441603.1c69fb81.4b06b.5a29@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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,T_SCC_BODY_TEXT_LINE 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 Wed, Mar 30, 2022 at 12:17:09PM -0400, Johannes Weiner wrote: > It's add_to_page_cache_lru() that sets the flag. > > Basically, when a PageWorkingset (hot) page gets reclaimed, the bit is > stored in the vacated tree slot. When the entry is brought back in, > add_to_page_cache_lru() transfers it to the newly allocated page. Ok. In this case my patch didn't quite do the right thing for readahead either. But that does leave a question for the btrfs compressed case, which only adds extra pages to a read to readahad a bigger cluster size - that is these pages are not read at the request of the VM. Does it really make sense to do PSI accounting for them in that case?