From: "yukuai (C)" <yukuai3@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: <axboe@kernel.dk>, <paolo.valente@linaro.org>,
<fchecconi@gmail.com>, <avanzini.arianna@gmail.com>,
<mkoutny@suse.com>, <cgroups@vger.kernel.org>,
<linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<yi.zhang@huawei.com>
Subject: Re: [PATCH v2 -next] blk-cgroup: synchoronize blkg creation against policy deactivation
Date: Fri, 15 Oct 2021 09:48:28 +0800 [thread overview]
Message-ID: <6fc9eaa8-c367-f458-4ed9-94af60b55ca0@huawei.com> (raw)
In-Reply-To: <YWi27oAU0v5v86eN@slm.duckdns.org>
On 2021/10/15 7:02, Tejun Heo wrote:
> On Wed, Oct 13, 2021 at 08:44:56PM +0800, Yu Kuai wrote:
>> @@ -1401,6 +1406,7 @@ void blkcg_deactivate_policy(struct request_queue *q,
>> if (queue_is_mq(q))
>> blk_mq_freeze_queue(q);
>>
>> + mutex_lock(&q->blkg_lock);
>> spin_lock_irq(&q->queue_lock);
>
> Given that deactivation drains q_usage_counter through
> blk_mq_freeze_queue(), can't the blkg_conf_prep() just pin the usage count?
>
In fact, the caller of blkcg_deactivate_policy() aready freeze the
queue, either from blk_cleanup_queue() or from elevator_switch().
Grab q_usage_counter in blk_conf_prep() can prevent concurrent with
blkcg_deactivate_policy(), I'm afraid will it be too much since it
will also be synchoronized with all the other freeze/unfreeze queues?
Thanks,
Kuai
prev parent reply other threads:[~2021-10-15 1:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 12:44 Yu Kuai
2021-10-14 23:02 ` Tejun Heo
2021-10-15 1:48 ` yukuai (C) [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=6fc9eaa8-c367-f458-4ed9-94af60b55ca0@huawei.com \
--to=yukuai3@huawei.com \
--cc=avanzini.arianna@gmail.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=fchecconi@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=paolo.valente@linaro.org \
--cc=tj@kernel.org \
--cc=yi.zhang@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®