From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Bart Van Assche <bvanassche@acm.org>,
Ming Lei <ming.lei@redhat.com>,
Damien Le Moal <dlemoal@kernel.org>
Subject: [PATCH] block: Do not merge if merging is disabled
Date: Thu, 6 Jul 2023 13:14:33 -0700 [thread overview]
Message-ID: <20230706201433.3987617-1-bvanassche@acm.org> (raw)
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>
---
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);
next reply other threads:[~2023-07-06 20:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-06 20:14 Bart Van Assche [this message]
2023-07-06 23:43 ` [PATCH] block: Do not merge if merging is disabled Damien Le Moal
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=20230706201433.3987617-1-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.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