From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Huanpeng Xin <xinhuanpeng9@gmail.com>
Cc: minchan@kernel.org, ngupta@vflare.org, axboe@kernel.dk,
senozhatsky@chromium.org, linux-kernel@vger.kernel.org,
linux-block@vger.kernel.org, xinhuanpeng <xinhuanpeng@xiaomi.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] zram: set zram bio priority to REQ_PRIO.
Date: Tue, 18 Jul 2023 16:49:29 +0900 [thread overview]
Message-ID: <20230718074929.GD955071@google.com> (raw)
In-Reply-To: <20230718071154.21566-1-xinhuanpeng9@gmail.com>
Cc-ing Christoph
On (23/07/18 15:11), Huanpeng Xin wrote:
>
> When the system memory pressure is high, set zram bio priority
> to REQ_PRIO can quickly swap zarm's memory to backing device,
read_from_bdev_async() does the opposite.
[..]
> @@ -616,7 +616,7 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec,
> {
> + bio = bio_alloc(zram->bdev, 1, parent ? parent->bi_opf : REQ_OP_READ | REQ_PRIO,
> GFP_NOIO);
[..]
> @@ -746,7 +746,7 @@ static ssize_t writeback_store(struct device *dev,
> ...
> bio_init(&bio, zram->bdev, &bio_vec, 1,
> - REQ_OP_WRITE | REQ_SYNC);
> + REQ_OP_WRITE | REQ_SYNC | REQ_PRIO);
In general, zram writeback is not for situations when the system
is critically low on memory; performance there is not that important,
so I'm not sure whether we want to boost requests' priorities.
next prev parent reply other threads:[~2023-07-18 7:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 7:11 [PATCH] zram: set zram bio priority to REQ_PRIO Huanpeng Xin
2023-07-18 7:49 ` Sergey Senozhatsky [this message]
2023-07-18 11:51 ` Sergey Senozhatsky
2023-07-20 8:34 ` Christoph Hellwig
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=20230718074929.GD955071@google.com \
--to=senozhatsky@chromium.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=xinhuanpeng9@gmail.com \
--cc=xinhuanpeng@xiaomi.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