All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Jens Axboe <axboe@kernel.dk>
Cc: <linux-block@vger.kernel.org>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Niklas Cassel <Niklas.Cassel@wdc.com>, Jan Kara <jack@suse.cz>
Subject: [PATCH 7/8] block: Initialize bio priority earlier
Date: Mon, 20 Jun 2022 18:11:48 +0200	[thread overview]
Message-ID: <20220620161153.11741-7-jack@suse.cz> (raw)
In-Reply-To: <20220620160726.19798-1-jack@suse.cz>

Bio's IO priority needs to be initialized before we try to merge the bio
with other bios. Otherwise we could merge bios which would otherwise
receive different IO priorities leading to possible QoS issues.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 block/blk-mq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 67a7bfa58b7c..e17d822e6051 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2825,6 +2825,8 @@ void blk_mq_submit_bio(struct bio *bio)
 	if (!bio_integrity_prep(bio))
 		return;
 
+	bio_set_ioprio(bio);
+
 	rq = blk_mq_get_cached_request(q, plug, &bio, nr_segs);
 	if (!rq) {
 		if (!bio)
@@ -2836,8 +2838,6 @@ void blk_mq_submit_bio(struct bio *bio)
 
 	trace_block_getrq(bio);
 
-	bio_set_ioprio(bio);
-
 	rq_qos_track(q, rq, bio);
 
 	blk_mq_bio_to_request(rq, bio, nr_segs);
-- 
2.35.3


  parent reply	other threads:[~2022-06-20 16:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 16:11 [PATCH 0/8 v3] block: Fix IO priority mess Jan Kara
2022-06-20 16:11 ` [PATCH 1/8] block: fix default IO priority handling again Jan Kara
2022-06-20 23:44   ` Damien Le Moal
2022-06-20 16:11 ` [PATCH 2/8] block: Return effective IO priority from get_current_ioprio() Jan Kara
2022-06-20 23:45   ` Damien Le Moal
2022-06-20 16:11 ` [PATCH 3/8] block: Make ioprio_best() static Jan Kara
2022-06-20 23:47   ` Damien Le Moal
2022-06-21  8:01     ` Jan Kara
2022-06-20 16:11 ` [PATCH 4/8] block: Fix handling of tasks without ioprio in ioprio_get(2) Jan Kara
2022-06-20 20:28   ` kernel test robot
2022-06-20 20:28   ` kernel test robot
2022-06-20 21:49   ` kernel test robot
2022-06-20 23:57   ` Damien Le Moal
2022-06-21  8:15     ` Jan Kara
2022-06-21  8:31       ` Damien Le Moal
2022-06-21  0:11   ` kernel test robot
2022-06-20 16:11 ` [PATCH 5/8] blk-ioprio: Remove unneeded field Jan Kara
2022-06-20 23:58   ` Damien Le Moal
2022-06-20 16:11 ` [PATCH 6/8] blk-ioprio: Convert from rqos policy to direct call Jan Kara
2022-06-21  0:00   ` Damien Le Moal
2022-06-21  8:21     ` Jan Kara
2022-06-20 16:11 ` Jan Kara [this message]
2022-06-21  0:01   ` [PATCH 7/8] block: Initialize bio priority earlier Damien Le Moal
2022-06-20 16:11 ` [PATCH 8/8] block: Always initialize bio IO priority on submit Jan Kara
2022-06-21  0:02   ` Damien Le Moal
  -- strict thread matches above, loose matches on Subject: below --
2022-06-15 16:16 [PATCH 0/8 v2] block: Fix IO priority mess Jan Kara
2022-06-15 16:16 ` [PATCH 7/8] block: Initialize bio priority earlier Jan Kara

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=20220620161153.11741-7-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=Niklas.Cassel@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=linux-block@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.