From: Damien Le Moal <dlemoal@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Ming Lei <ming.lei@redhat.com>
Subject: Re: [PATCH] block: Do not merge if merging is disabled
Date: Fri, 7 Jul 2023 08:43:17 +0900 [thread overview]
Message-ID: <4c6be788-0b13-6c96-fd35-ba18833b2c35@kernel.org> (raw)
In-Reply-To: <20230706201433.3987617-1-bvanassche@acm.org>
On 7/7/23 05:14, Bart Van Assche wrote:
> While testing the performance impact of zoned write pipelining, I
> noticed that merging happens even if merging has been disabled via
> sysfs. Fix this.
>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Ming Lei <ming.lei@redhat.com>
> Cc: Damien Le Moal <dlemoal@kernel.org>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Looks good.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> ---
> block/blk-mq-sched.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
> index 67c95f31b15b..8883721f419a 100644
> --- a/block/blk-mq-sched.c
> +++ b/block/blk-mq-sched.c
> @@ -375,7 +375,8 @@ bool blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio,
> bool blk_mq_sched_try_insert_merge(struct request_queue *q, struct request *rq,
> struct list_head *free)
> {
> - return rq_mergeable(rq) && elv_attempt_insert_merge(q, rq, free);
> + return !blk_queue_nomerges(q) && rq_mergeable(rq) &&
> + elv_attempt_insert_merge(q, rq, free);
> }
> EXPORT_SYMBOL_GPL(blk_mq_sched_try_insert_merge);
>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2023-07-06 23:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-06 20:14 [PATCH] block: Do not merge if merging is disabled Bart Van Assche
2023-07-06 23:43 ` Damien Le Moal [this message]
2023-07-07 0:38 ` Ming Lei
2023-07-07 1:50 ` Bart Van Assche
2023-07-07 3:34 ` Damien Le Moal
2023-07-07 13:50 ` Bart Van Assche
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=4c6be788-0b13-6c96-fd35-ba18833b2c35@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.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