From: Nilay Shroff <nilay@linux.ibm.com>
To: yukuai@fygo.io, tj@kernel.org, axboe@kernel.dk
Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, zhengqixing@huawei.com, hch@lst.de,
yizhou.tang@shopee.com
Subject: Re: [PATCH v4 0/4] blk-cgroup: fix blkg list and policy data races
Date: Mon, 3 Aug 2026 14:39:14 +0530 [thread overview]
Message-ID: <523e4487-4ac8-434d-bebe-03ae8212b577@linux.ibm.com> (raw)
In-Reply-To: <055d481c-dbfe-4749-82f0-49e330724d86@fygo.io>
On 8/3/26 1:50 PM, yu kuai wrote:
> Hi,
>
> 在 2026/8/3 14:51, Nilay Shroff 写道:
>> On 8/2/26 4:55 PM, Yu Kuai wrote:
>>> From: Yu Kuai <yukuai@fygo.io>
>>>
>>> This set fix some problems that are reported long time ago with
>>> minimal changes,
>>> the blkcg_mutex refactor I'm working on can fix these problems as
>>> well, but it's
>>> complicated and may not land in this merge window. So I think this
>>> set should land
>>> in this merge window first.
>>>
>>> Patch 1 protects blkg_destroy_all()'s q->blkg_list walk with
>>> blkcg_mutex.
>>>
>>> Patches 2-3 fix races between blkcg_activate_policy() and concurrent
>>> blkg destruction.
>>>
>>> Patch 4 factors the policy data teardown loop into a helper after the
>>> race fixes.
>>>
>>
>> This series looks good to me, however as I recall, we discussed about
>> protecting blkg_create() as well using ->blkcg_mutex. I remember the
>> blkg_create() is not protected with ->blkcg_mutex under each call path,
>> so would you to also cover that change in this patchset?
>
> I can't do this for now without a big refactor, because it's possible that
> blkg_create() can be called from bio_set_dev(), and bio_set_dev() can be
> called from many atomic contexts, examples are patch 1,2,3,5,8,9,10 from the
> following RFC v1 set:
>
> [RFC PATCH v1 00/17] blk-cgroup: protect blkgs with blkcg_mutex - Yu Kuai <https://lore.kernel.org/all/20260704195124.1375075-1-yukuai@kernel.org/>
>
Okay understood. With that, for this entire patchset:
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
next prev parent reply other threads:[~2026-08-03 9:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 11:25 [PATCH v4 0/4] blk-cgroup: fix blkg list and policy data races Yu Kuai
2026-08-02 11:25 ` [PATCH v4 1/4] blk-cgroup: protect q->blkg_list iteration in blkg_destroy_all() with blkcg_mutex Yu Kuai
2026-08-02 11:45 ` Tao Cui
2026-08-02 11:25 ` [PATCH v4 2/4] blk-cgroup: fix race between policy activation and blkg destruction Yu Kuai
2026-08-02 11:46 ` Tao Cui
2026-08-02 11:25 ` [PATCH v4 3/4] blk-cgroup: skip dying blkg in blkcg_activate_policy() Yu Kuai
2026-08-02 11:47 ` Tao Cui
2026-08-02 11:25 ` [PATCH v4 4/4] blk-cgroup: factor policy pd teardown loop into helper Yu Kuai
2026-08-02 11:25 ` [PATCH v4 0/4] blk-cgroup: fix blkg list and policy data races Yu Kuai
2026-08-03 6:51 ` Nilay Shroff
2026-08-03 8:20 ` yu kuai
2026-08-03 9:09 ` Nilay Shroff [this message]
2026-08-04 2:17 ` Jens Axboe
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=523e4487-4ac8-434d-bebe-03ae8212b577@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=yizhou.tang@shopee.com \
--cc=yukuai@fygo.io \
--cc=zhengqixing@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