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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78E70ECAAD3 for ; Wed, 14 Sep 2022 11:46:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 19D218D0001; Wed, 14 Sep 2022 07:46:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1259E6B0074; Wed, 14 Sep 2022 07:46:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F08E18D0001; Wed, 14 Sep 2022 07:46:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id E03DB6B0073 for ; Wed, 14 Sep 2022 07:46:56 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id BFE1CA0A12 for ; Wed, 14 Sep 2022 11:46:56 +0000 (UTC) X-FDA: 79910514432.25.07E322D Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by imf11.hostedemail.com (Postfix) with ESMTP id 2813F40098 for ; Wed, 14 Sep 2022 11:46:55 +0000 (UTC) Received: by mail-wr1-f44.google.com with SMTP id t7so25225901wrm.10 for ; Wed, 14 Sep 2022 04:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=R0+X/Vt8U/YJmmqx4EaockLsNUJKMLE86zCLujidRXk=; b=x896VLq/0T8z+7Ik2gVEyES3l8Hvh2btFLNkRDkyFPILpk8pTXgwHjASSECXNYjAWz /4nzKNwpCXNTkvMp3wIXm+yfyMEvJgbc0MMk3D9eqte3BBV33uNDi2zp5DN9H7jUKXIY QXvEQyfRrTQbfi9CRmk38OQyufCqNJxtBsi780ZltRwyVkT9bfkauohtiuVyIg+158uh +dFEzwIdSyjmXHrCx/K924lHgmJPmWJYLsCwaV9AGTR61qVUxaiMSZ2OhTc/JpkYvAPH 4lWJuFbIHC8bixWnUFa+49kysfkp6O/h1VUzL+fvL4Iut0DY7EPkgG7OYYgpkJLQBkQf Dppg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=R0+X/Vt8U/YJmmqx4EaockLsNUJKMLE86zCLujidRXk=; b=dKFJSp2m/LmD2pMfUSLnfjWxY828RZYjhAeGCyOjrM5XyAFuM1LrZxv5Zkc31/GBM2 Sip7phCD+Gk2GvtslgOUXX2Zd6f2RLfIzASReWF5cT4OhSGHeujMDKpo03GNxEP1ZFD6 vVBKaH7wh9ORU+FzEaSiaQHkDpMioaJFxgWB8Afq7P4Q1KMzQVzZM7adEu2hplXX3S0H CrgNxcju5G10v0CALFlP/nDdn39IGC2rWuhV3EgL6hFGyNpeQ68ZB6P2TQUbwiJe7SA8 RQZoiuhZ2Gn4Nb9hVeDgyBzQT8Xjp1L7wd/8V2FX74eTG3B6MMxBQ8MHTDa5ido6QwMQ orSA== X-Gm-Message-State: ACgBeo3DMRvYhKc3IzG106G9Vuk2A72Vhbi+YyYdSyERk2lT8jibEMlp 2FO2VZjgZwgyFgbH1TbSZm5EbA== X-Google-Smtp-Source: AA6agR5rGXGDLe/tOLWmuZc+R9A3yuqUfg5LeZ1FohTf0HB09NHH8ytKek+mH6dzb5U83k4gaIwQ1A== X-Received: by 2002:a5d:47aa:0:b0:226:dbf6:680c with SMTP id 10-20020a5d47aa000000b00226dbf6680cmr21226454wrb.581.1663156014968; Wed, 14 Sep 2022 04:46:54 -0700 (PDT) Received: from localhost ([185.122.133.20]) by smtp.gmail.com with ESMTPSA id y25-20020a05600c365900b003b483000583sm11359663wmq.48.2022.09.14.04.46.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 04:46:54 -0700 (PDT) Date: Wed, 14 Sep 2022 12:46:54 +0100 From: Johannes Weiner To: Christoph Hellwig Cc: Jens Axboe , Matthew Wilcox , Suren Baghdasaryan , Andrew Morton , Chris Mason , Josef Bacik , David Sterba , Gao Xiang , Chao Yu , linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-mm@kvack.org Subject: Re: [PATCH 3/5] btrfs: add manual PSI accounting for compressed reads Message-ID: References: <20220910065058.3303831-1-hch@lst.de> <20220910065058.3303831-4-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220910065058.3303831-4-hch@lst.de> ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b="x896VLq/"; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf11.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.221.44 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663156016; a=rsa-sha256; cv=none; b=mJbhx+y4c4ft4RzHZnjJmCzTOLzlrdISbfWtuHzZvK53PqQD3kYhqr4dkISKVqzAOca7Qb TivjoU/nSJ/uruPopeEJqIJgGUh+C6M5AlxT1OQpueZTVEMF2dJBeaNPHI+6K8TDLXF4KZ mGjQxSMuV5U4Q609prc8bGhuqAbBfn4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663156016; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=R0+X/Vt8U/YJmmqx4EaockLsNUJKMLE86zCLujidRXk=; b=SklLGGQsv5EJACT5NU13luPTFcL7llumAWHOk+m1HrAWIp20bVPrIit4TdgmBb8YNVzb6/ KxVVaiKz+STmXECheTg4+8LOlvGGnfTAFEHJK42aCWszLW/t4t8EuF6KTbb50aBqqyRV7R 0Hyf+lk03Y2K6Uji/YlVjVtywuLp5Qs= X-Rspam-User: Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b="x896VLq/"; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf11.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.221.44 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 2813F40098 X-Stat-Signature: nyn3385f4mnaz48k389qq7ich98kf1rp X-HE-Tag: 1663156015-52610 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Sep 10, 2022 at 08:50:56AM +0200, Christoph Hellwig wrote: > btrfs compressed reads try to always read the entire compressed chunk, > even if only a subset is requested. Currently this is covered by the > magic PSI accounting underneath submit_bio, but that is about to go > away. Instead add manual psi_memstall_{enter,leave} annotations. > > Note that for readahead this really should be using readahead_expand, > but the additionals reads are also done for plain ->read_folio where > readahead_expand can't work, so this overall logic is left as-is for > now. > > Signed-off-by: Christoph Hellwig Acked-by: Johannes Weiner