From: Nilay Shroff <nilay@linux.ibm.com>
To: Yu Kuai <yukuai1@huaweicloud.com>, linux-block@vger.kernel.org
Cc: ming.lei@redhat.com, axboe@kernel.dk, hch@lst.de, kch@nvidia.com,
shinichiro.kawasaki@wdc.com, gjoyce@ibm.com,
"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCHv2 1/2] block: avoid cpu_hotplug_lock depedency on freeze_lock
Date: Wed, 6 Aug 2025 11:13:25 +0530 [thread overview]
Message-ID: <0133f954-2602-476f-bfb8-4850d7ea84d9@linux.ibm.com> (raw)
In-Reply-To: <5820a0d3-3035-6d4e-8c96-45154d8a1cd5@huaweicloud.com>
On 8/6/25 6:48 AM, Yu Kuai wrote:
> Hi,
>
> 在 2025/08/06 1:17, Nilay Shroff 写道:
>> static inline void rq_qos_done_bio(struct bio *bio)
>> {
>> - if (static_branch_unlikely(&block_rq_qos) &&
>> - bio->bi_bdev && (bio_flagged(bio, BIO_QOS_THROTTLED) ||
>> - bio_flagged(bio, BIO_QOS_MERGED))) {
>> - struct request_queue *q = bdev_get_queue(bio->bi_bdev);
>> - if (q->rq_qos)
>> - __rq_qos_done_bio(q->rq_qos, bio);
>> - }
>> + struct request_queue *q;
>> +
>> + if (!bio->bi_bdev || (!bio_flagged(bio, BIO_QOS_THROTTLED) &&
>> + !bio_flagged(bio, BIO_QOS_MERGED)))
>> + return;
>> +
>> + q = bdev_get_queue(bio->bi_bdev);
>> + if (unlikely(test_bit(QUEUE_FLAG_QOS_ENABLED, &q->queue_flags)) &&
>> + q->rq_qos)
> This unlinkey doesn't make sense, BIO_QOS_THROTTLED or BIO_QOS_MERGED
> already indicates rq_qos is enabled while issuing IO, and rq_qos should
> still be valid until this IO is done.
>
Yes good point! Agreed that having BIO_QOS_THROTTLED or BIO_QOS_MERGED set,
implicitly implies that q->rq_qos must not be NULL.
> Perhaps a prep cleanup patch to remove this checking?
Yes I'd do that but lets wait for Jens or Ming if in case they have any
further comment before I spin v3.
Thanks,
--Nilay
next prev parent reply other threads:[~2025-08-06 5:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 17:17 [PATCHv2 0/2] block: blk-rq-qos: replace static key with atomic bitop Nilay Shroff
2025-08-05 17:17 ` [PATCHv2 1/2] block: avoid cpu_hotplug_lock depedency on freeze_lock Nilay Shroff
2025-08-06 1:18 ` Yu Kuai
2025-08-06 5:43 ` Nilay Shroff [this message]
2025-08-05 17:17 ` [PATCHv2 2/2] block: clear QUEUE_FLAG_QOS_ENABLED in rq_qos_del() Nilay Shroff
2025-08-06 1:25 ` Yu Kuai
2025-08-06 5:47 ` Nilay Shroff
2025-08-08 7:49 ` [PATCHv2 0/2] block: blk-rq-qos: replace static key with atomic bitop Shinichiro Kawasaki
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=0133f954-2602-476f-bfb8-4850d7ea84d9@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=axboe@kernel.dk \
--cc=gjoyce@ibm.com \
--cc=hch@lst.de \
--cc=kch@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=shinichiro.kawasaki@wdc.com \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@huawei.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;
as well as URLs for NNTP newsgroup(s).