From: Johannes Weiner <hannes@cmpxchg.org>
To: Zhaoyang Huang <huangzhaoyang@gmail.com>
Cc: Nitin Gupta <ngupta@vflare.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Jens Axboe <axboe@kernel.dk>, Minchan Kim <minchan@kernel.org>,
Zhaoyang Huang <zhaoyang.huang@unisoc.com>,
"open list:MEMORY MANAGEMENT" <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] mm: count zram read/write into PSI_IO_WAIT
Date: Thu, 2 Dec 2021 11:28:25 -0500 [thread overview]
Message-ID: <Yaj0KTp17AaHMQyC@cmpxchg.org> (raw)
In-Reply-To: <CAGWkznHq15QN5Dn6_QfbAm7jS9OPCV4TVqn2_9RxUBx0V9v78w@mail.gmail.com>
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?
What about when you use zram with disk writeback enabled, and you see
a mix of decompression and actual disk IO. Wouldn't you want to be
able to tell the two apart, to see if you're short on CPU or short on
IO bandwidth in this setup? Your patch would make that impossible.
This needs a much more comprehensive changelog.
> > @@ -1246,7 +1247,9 @@ static int __zram_bvec_read(struct zram *zram, struct page *page, u32 index,
> > zram_get_element(zram, index),
> > bio, partial_io);
> > }
> > -
> > +#ifdef CONFIG_PSI
> > + psi_task_change(current, 0, TSK_IOWAIT);
> > +#endif
Add psi_iostall_enter() and leave helpers that encapsulate the ifdefs.
next prev parent reply other threads:[~2021-12-02 16:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 10:59 Huangzhaoyang
2021-12-01 11:12 ` Zhaoyang Huang
2021-12-02 16:28 ` Johannes Weiner [this message]
2021-12-03 9:16 ` Zhaoyang Huang
2021-12-08 16:38 ` Johannes Weiner
2021-12-08 17:45 ` Chris Down
2021-12-08 17:47 ` Chris Down
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yaj0KTp17AaHMQyC@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=axboe@kernel.dk \
--cc=huangzhaoyang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=senozhatsky@chromium.org \
--cc=zhaoyang.huang@unisoc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox