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 4776EC433EF for ; Wed, 8 Dec 2021 17:45:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8DA6D6B0074; Wed, 8 Dec 2021 12:45:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8894F6B0075; Wed, 8 Dec 2021 12:45:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 750D66B0078; Wed, 8 Dec 2021 12:45:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0003.hostedemail.com [216.40.44.3]) by kanga.kvack.org (Postfix) with ESMTP id 66FEE6B0074 for ; Wed, 8 Dec 2021 12:45:35 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2DC298248076 for ; Wed, 8 Dec 2021 17:45:25 +0000 (UTC) X-FDA: 78895353810.01.4350428 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by imf26.hostedemail.com (Postfix) with ESMTP id A97BC20019C8 for ; Wed, 8 Dec 2021 17:45:24 +0000 (UTC) Received: by mail-ed1-f45.google.com with SMTP id x15so11127041edv.1 for ; Wed, 08 Dec 2021 09:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kxcdhkn8MQwqsKhhsktfOoJBZWiG64ZAMlkAvsTSfVM=; b=bklVbzkbUGBwjDoMWCU9oCeiQU/fml9+ixZOPvoWGSvUOg21/WdR/YzOcdNu5tfd8U L02k0yYpHQXnIdwVoiqmEfhQfktTepwBShNNLOWmmdsSehBnhWHjAeHnamQ/t0nTjAb4 wtsARPLOcpjoSP6WSRHnXqwXoG9iEKWkB2cSI= 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:user-agent; bh=kxcdhkn8MQwqsKhhsktfOoJBZWiG64ZAMlkAvsTSfVM=; b=oLQtuAXvFIgO0oEeRmq3ZrOUvp49aKWS1aWv32KH/spTtYpPmTltE9wqQDj451qiiJ GEBRA3bQOjQmECJZZ13me6pmaLB710CJeGnwp9TdZ+Dl2W5QdAkVScnmRFEynJPa3r7Z YFUMm0jC8zoMkKEKkIRsRI8U6w0jNYuP4hNvDErBh9n72BBeFi0PbvXxouyzxQQJDOny Z72YMBbNwhHN1a4Ph26U+7K28sm5NFcIUemsb4ck84t477ba8PBO9HE5n20OfFuY7U16 i3amb4MqBm9T9byLhWufN9vzPYCtvYpu4o+8p8bSsx2Mk+GvcL7yJ/23tpspTJP2bbHj ko+w== X-Gm-Message-State: AOAM532D9jaMDhGucmI0NmcxsV+KzeO5CDed2MAuZiG1i++7z1Pkmc8/ 5uT3AyZhuvrhr40H1zNB+7FQxQ== X-Google-Smtp-Source: ABdhPJzJBM98HPC9I/dyQUGgvQpo8g8Rx5F5FXP/fYY5//OaIshH7PydXpRqRfGELJe7tqQGqAexeg== X-Received: by 2002:a17:906:5653:: with SMTP id v19mr9100912ejr.360.1638985523255; Wed, 08 Dec 2021 09:45:23 -0800 (PST) Received: from localhost ([2620:10d:c093:400::5:c7b3]) by smtp.gmail.com with ESMTPSA id ga26sm1749285ejc.11.2021.12.08.09.45.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Dec 2021 09:45:22 -0800 (PST) Date: Wed, 8 Dec 2021 17:45:22 +0000 From: Chris Down To: Zhaoyang Huang Cc: Johannes Weiner , 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; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.1.3 (987dde4c) (2021-09-10) X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: A97BC20019C8 X-Stat-Signature: b45zw3hipbasb8qfhxusii1rbheq1akt Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=chrisdown.name header.s=google header.b=bklVbzkb; spf=pass (imf26.hostedemail.com: domain of chris@chrisdown.name designates 209.85.208.45 as permitted sender) smtp.mailfrom=chris@chrisdown.name; dmarc=pass (policy=none) header.from=chrisdown.name X-HE-Tag: 1638985524-652556 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: Zhaoyang Huang writes: >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. I think part of the confusion here is that the name "io" doesn't really just mean "io", it means "disk I/O". As in, we are targeting real, physical or network disk I/O. Of course, we can only do what's reasonable if the device we're accounting for is layers upon layers eventually leading to a memory-backed device, but _intentionally_ polluting that with more memory-bound accesses doesn't make any sense when we already have separate accounting for memory. Why would anyone want that? I'm with Johannes here, I think this would actively make memory pressure monitoring less useful. This is a NAK from my perspective as someone who actually uses these things in production.