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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CD1DC433EF for ; Wed, 8 Dec 2021 16:39:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9EB8F6B0072; Wed, 8 Dec 2021 11:38:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 999B86B0073; Wed, 8 Dec 2021 11:38:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 83A086B0074; Wed, 8 Dec 2021 11:38:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0110.hostedemail.com [216.40.44.110]) by kanga.kvack.org (Postfix) with ESMTP id 6E2486B0072 for ; Wed, 8 Dec 2021 11:38:50 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 213EB89D27 for ; Wed, 8 Dec 2021 16:38:40 +0000 (UTC) X-FDA: 78895185600.02.7056B16 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by imf28.hostedemail.com (Postfix) with ESMTP id 9757390000A1 for ; Wed, 8 Dec 2021 16:38:39 +0000 (UTC) Received: by mail-qt1-f172.google.com with SMTP id 8so2708621qtx.5 for ; Wed, 08 Dec 2021 08:38:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nF6V5tMWiKH75knkiRMFt+EtHKzskngGPrZf17wdLBM=; b=hjbuZAqmUSEBdngCqKX0ob0KoeEJIVsY12CjCZs5hnQVfPPJjnKfWn69T9sOk/v+QQ lgjeYPRFl+yLZMqoxOffYVRuWEvhYl7Em8haJJtWQESZTyFkclXtoFcQUcelBGhbarem aQUEgvY7u4zEGp5rB4/DcfNJOEhwOcuRb/rybV47vxPPDuJunqGJDPU3xr6cK59mWjgt HHtb6Z+Q5IWxPiBJ8daUWLYT2tG4opt64WD1ms8BkLS5LjUh9dcN75sglDg2ZakWsnfR 4Kc0hFhrCg4Zvrnl9eklv8FJuHrOdFFAOapg6mfWKH179mHlFyprs/+f/N/kyt9ANdgS CwgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nF6V5tMWiKH75knkiRMFt+EtHKzskngGPrZf17wdLBM=; b=iugxkguHEZsiOSFMjTPU/dWVz2FUHdytZTqzKrLd4HlTbZNGxtYLFbcD4TJwKMi9kA sZe3+SPtYb7WoE4M7qkvhmeSzcdw8I3QzPZbsgscM1/vIAOEu0X++Di2I+RQq/Lt82uX RvzLKzslsuFRPG5YDG5whSn3aIhs4e/N6SRTzfyHdWJxYmpMAGnKNvjEC/c10hRffQPq BuKiCuR5raKpwYfwMOfiA/oqayi63y+dLhIJgJwYmLvrgremfoy9y0Lehn0LrIOgp1uT JLYAw7sg6Rl9LUMETcgt9sieZwyIAO3P7rgnMw2vDxZivodGu+sLaNHLI3ZeaMB6PiJx DMOg== X-Gm-Message-State: AOAM5317lgbFjjdiRy4ba0qqXGZ9FNtWBCNX78nvivPjYja9PpvquOgO /9v+60JUQXxnojWJ8j1p7wKIiw== X-Google-Smtp-Source: ABdhPJzvNgCijlTEnKMhDzTiI01sP7Yrg8WXhJZIrQGUnZkhUv1h8JBG473bDhFVIJs45vSgx/ttbA== X-Received: by 2002:ac8:7d87:: with SMTP id c7mr9148381qtd.501.1638981518853; Wed, 08 Dec 2021 08:38:38 -0800 (PST) Received: from localhost ([2620:10d:c091:480::1:6bda]) by smtp.gmail.com with ESMTPSA id d13sm1671930qkn.100.2021.12.08.08.38.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Dec 2021 08:38:38 -0800 (PST) Date: Wed, 8 Dec 2021 11:38:37 -0500 From: Johannes Weiner To: Zhaoyang Huang Cc: Nitin Gupta , Sergey Senozhatsky , Jens Axboe , Minchan Kim , Zhaoyang Huang , "open list:MEMORY MANAGEMENT" , LKML Subject: Re: [RFC PATCH] mm: count zram read/write into PSI_IO_WAIT Message-ID: References: <1638356341-17014-1-git-send-email-huangzhaoyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 9757390000A1 X-Stat-Signature: mxcw3k1srtwddn9eujaercfs4ndjk1pk Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=hjbuZAqm; spf=pass (imf28.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.172 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org; dmarc=pass (policy=none) header.from=cmpxchg.org X-HE-Tag: 1638981519-591849 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 Fri, Dec 03, 2021 at 05:16:47PM +0800, Zhaoyang Huang wrote: > On Fri, Dec 3, 2021 at 12:28 AM Johannes Weiner wrote: > > > > On Wed, Dec 01, 2021 at 07:12:30PM +0800, Zhaoyang Huang wrote: > > > There is no chance for zram reading/writing to be counted in > > > PSI_IO_WAIT so far as zram will deal with the request just in current > > > context without invoking submit_bio and io_schedule. > > > > Hm, but you're also not waiting for a real io device - during which > > the CPU could be doing something else e.g. You're waiting for > > decompression. The thread also isn't in D-state during that time. What > > scenario would benefit from this accounting? How is IO pressure from > > comp/decomp paths actionable to you? > No. Block device related D-state will be counted in via > psi_dequeue(io_wait). What I am proposing here is do NOT ignore the > influence on non-productive time by huge numbers of in-context swap > in/out (zram like). This can help to make IO pressure more accurate > and coordinate with the number of PSWPIN/OUT. It is like counting the > IO time within filemap_fault->wait_on_page_bit_common into > psi_mem_stall, which introduces memory pressure high by IO. It's not ignored, it shows up as memory pressure. Because those delays occur due to a lack of memory. On the other hand, having a faster IO device would make no difference to the time spent on compression and decompression. Counting this time as IO pressure makes no sense to me. I'm against merging this patch.