From: Christoph Hellwig <hch@infradead.org>
To: Jinliang Zheng <alexjlzheng@gmail.com>
Cc: cem@kernel.org, djwong@kernel.org, dchinner@redhat.com,
alexjlzheng@tencent.com, linux-xfs@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xfs: don't allow log recover IO to be throttled
Date: Mon, 3 Mar 2025 06:08:56 -0800 [thread overview]
Message-ID: <Z8W3-Jni2k_MqmZs@infradead.org> (raw)
In-Reply-To: <20250303112301.766938-1-alexjlzheng@tencent.com>
On Mon, Mar 03, 2025 at 07:23:01PM +0800, Jinliang Zheng wrote:
> When recovering a large filesystem, avoid log recover IO being
> throttled by rq_qos_throttle().
Why? Do you have numbers or a bug report?
> diff --git a/fs/xfs/xfs_bio_io.c b/fs/xfs/xfs_bio_io.c
> index fe21c76f75b8..259955f2aeb2 100644
> --- a/fs/xfs/xfs_bio_io.c
> +++ b/fs/xfs/xfs_bio_io.c
> @@ -22,12 +22,15 @@ xfs_rw_bdev(
> unsigned int left = count;
> int error;
> struct bio *bio;
> + blk_opf_t opf = op | REQ_META | REQ_SYNC;
>
> if (is_vmalloc && op == REQ_OP_WRITE)
> flush_kernel_vmap_range(data, count);
>
> - bio = bio_alloc(bdev, bio_max_vecs(left), op | REQ_META | REQ_SYNC,
> - GFP_KERNEL);
> + if (op == REQ_OP_WRITE)
> + opf |= REQ_IDLE;
And there's really no need to do any games with the op here. Do it in
the caller and document why it's done there.
next prev parent reply other threads:[~2025-03-03 14:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-03 11:23 [PATCH] xfs: don't allow log recover IO to be throttled Jinliang Zheng
2025-03-03 14:08 ` Christoph Hellwig [this message]
2025-03-03 20:45 ` Dave Chinner
2025-03-09 12:41 ` Jinliang Zheng
2025-03-10 13:17 ` Carlos Maiolino
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=Z8W3-Jni2k_MqmZs@infradead.org \
--to=hch@infradead.org \
--cc=alexjlzheng@gmail.com \
--cc=alexjlzheng@tencent.com \
--cc=cem@kernel.org \
--cc=dchinner@redhat.com \
--cc=djwong@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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