From: Yu Kuai <yukuai1@huaweicloud.com>
To: Keith Busch <kbusch@kernel.org>, Yu Kuai <yukuai1@huaweicloud.com>
Cc: hch@lst.de, ming.lei@redhat.com, axboe@kernel.dk,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
yi.zhang@huawei.com, yangerkun@huawei.com,
"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH] blk-mq: quiesce queue while reallocating hctxs
Date: Fri, 3 Mar 2023 10:21:49 +0800 [thread overview]
Message-ID: <a4176f2e-ba96-b259-25fd-106031f281dd@huaweicloud.com> (raw)
In-Reply-To: <ZAFMRUo9fdcJh/JD@kbusch-mbp.dhcp.thefacebook.com>
Hi,
在 2023/03/03 9:24, Keith Busch 写道:
> On Tue, Feb 21, 2023 at 05:24:36PM +0800, Yu Kuai wrote:
>> From: Yu Kuai <yukuai3@huawei.com>
>>
>> commit 8237c01f1696 ("blk-mq: use quiesced elevator switch when
>> reinitializing queues") add quiesce queue while switching elevator,
>> however, if old elevator is none, queue is still not quiesced. Hence
>> reallocating hctxs can concurrent with run queue. Fix it by also
>> quiesce queue in the beginning of __blk_mq_update_nr_hw_queues().
>
> Is this actually fixing anything? The quiesced elevator switch was to prevent
> use-after-free from an elevator being torn down, but if you are not switching
> elevators, then what resource does quiescing protect?
> .
>
What I can think of is hctx itself. run queue can fetch a hctx that will
be exited, I did't found any real problems yet, but I don't think it
is not good to run work for a exited or reused hctx.
Thanks,
Kuai
prev parent reply other threads:[~2023-03-03 2:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 9:24 Yu Kuai
2023-03-03 1:04 ` Yu Kuai
2023-03-03 1:24 ` Keith Busch
2023-03-03 2:21 ` Yu Kuai [this message]
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=a4176f2e-ba96-b259-25fd-106031f281dd@huaweicloud.com \
--to=yukuai1@huaweicloud.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.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
all inboxes | Powered by JetHome®