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 6D2C5ECAAD3 for ; Wed, 14 Sep 2022 11:47:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbiINLq7 (ORCPT ); Wed, 14 Sep 2022 07:46:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbiINLq6 (ORCPT ); Wed, 14 Sep 2022 07:46:58 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 532DA7A530 for ; Wed, 14 Sep 2022 04:46:56 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id h8so18288574wrf.3 for ; Wed, 14 Sep 2022 04:46:56 -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=Zg0ue9LGZF6fH/OLtYqG3LkWtjm2Tmr28eZtcCyyz0dG6NFSXBRpMfba/Pspriyslo CI4QXS6yHTXg4JkcmDf/ct1Ki9BLK0bnC7geLAWSeZ+3tgJtbR86tTECQ2GU3iI4B+AB Ju+VmABTov6Vw4LLL56kJMLhk4BUeqvAQE+kweD7ZmmlvfieYjoN/ADDELj5/u+TQ95Q CAHlQ/gjgRKhHw6yyCujKt6+FcTGkGqOsch4CBk225bmAB6rWKm93tC+LxjuovnA2ZA6 b6AKHNpv8M2J+XA5t8RJVqikIYSiCWZMf1nFXbsmgHEQuLmkXVKrrO87bi4Ge9K6Rxk1 lA7w== X-Gm-Message-State: ACgBeo3vzrlO0QvgLQVMAuy+I37p2rM9lfXXLA5QDK1kGE/aP8iGsH/m N1WusA9qSWAOGAqhgIbcnC50hg== 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> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 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 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4092CECAAD3 for ; Wed, 14 Sep 2022 11:47:11 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MSJTn2DSsz3bc3 for ; Wed, 14 Sep 2022 21:47:09 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=cmpxchg-org.20210112.gappssmtp.com header.i=@cmpxchg-org.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=x896VLq/; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=cmpxchg.org (client-ip=2a00:1450:4864:20::42c; helo=mail-wr1-x42c.google.com; envelope-from=hannes@cmpxchg.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=cmpxchg-org.20210112.gappssmtp.com header.i=@cmpxchg-org.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=x896VLq/; dkim-atps=neutral Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4MSJTf0vfTz2yMk for ; Wed, 14 Sep 2022 21:46:59 +1000 (AEST) Received: by mail-wr1-x42c.google.com with SMTP id bj14so25235068wrb.12 for ; Wed, 14 Sep 2022 04:46:58 -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=X2KAw6ugTM1In84wpEOs9dHntqwsL74SWk2EekEze4c9JNw9172BCrm+akbFgYnwFB Fv5ivbtNQ2TJvYd9Ai5SLhe8x1qrng64ip4SEQU+NA97J9jmyxTvolukCoLuGIeohtp+ k48MaxU60/dQ6ouOQsCN3lCm7cUYm4NpBq/FB8K01WisvdRdi26X7i7PIpQyZOtq9Xre mRfD0fTfad9Gwu1hBHImObA7DOaPPEAguon6eeD4fufXh292bBJ6xxYpN+6fsZ1R5vba 5TeOwTSbJowtRcRh066vECWjiQD0gYo/q1DcPziUn2eTkI5MjhIE2fsw2QakPnYneNvA Tgkw== X-Gm-Message-State: ACgBeo0NNDX7+pERrwwIzHgthTcOqPiWpffNALSO8YznQLHSXBH9AAvD jGKD4DG9I5ylWIhpGR/J5EagXw== 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 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> X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , linux-mm@kvack.org, linux-erofs@lists.ozlabs.org, Josef Bacik , Matthew Wilcox , linux-block@vger.kernel.org, Chris Mason , David Sterba , linux-fsdevel@vger.kernel.org, Andrew Morton , Suren Baghdasaryan , linux-btrfs@vger.kernel.org Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" 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