From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Tejun Heo <tj@kernel.org>
Cc: xuejiufei <jiufei.xue@linux.alibaba.com>,
Jens Axboe <axboe@kernel.dk>,
Caspar Zhang <caspar@linux.alibaba.com>,
linux-block <linux-block@vger.kernel.org>,
cgroups@vger.kernel.org
Subject: Re: [PATCH v2] blk-throttle: fix race between blkcg_bio_issue_check and cgroup_rmdir
Date: Mon, 5 Mar 2018 09:17:27 +0800 [thread overview]
Message-ID: <4f282c16-d8ce-783e-b274-0dbf28cf340a@linux.alibaba.com> (raw)
In-Reply-To: <20180304202317.GC231488@devbig577.frc2.facebook.com>
On 18/3/5 04:23, Tejun Heo wrote:
> Hello, Joseph.
>
> Sorry about late reply.
>
> On Wed, Feb 28, 2018 at 02:52:10PM +0800, Joseph Qi wrote:
>> In current code, I'm afraid pd_offline_fn() as well as the rest
>> destruction have to be called together under the same blkcg->lock and
>> q->queue_lock.
>> For example, if we split the pd_offline_fn() and radix_tree_delete()
>> into 2 phases, it may introduce a race between blkcg_deactivate_policy()
>> when exit queue and blkcg_css_free(), which will result in
>> pd_offline_fn() to be called twice.
>
> So, yeah, the sync scheme aroung blkg is pretty brittle and we'd need
> some restructuring to separate out blkg offlining and release, but it
> looks like that'd be the right thing to do, no?
>
Agree, except the restriction above, as of now I don't find any more.
I'll try to fix in the way you suggested and post v3.
Thanks,
Joseph
prev parent reply other threads:[~2018-03-05 1:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 8:40 [PATCH v2] blk-throttle: fix race between blkcg_bio_issue_check and cgroup_rmdir Joseph Qi
2018-02-07 21:38 ` Tejun Heo
2018-02-08 2:29 ` Joseph Qi
2018-02-08 15:23 ` Tejun Heo
2018-02-09 2:15 ` Joseph Qi
2018-02-12 17:11 ` Tejun Heo
2018-02-22 6:14 ` Joseph Qi
2018-02-22 15:18 ` Tejun Heo
2018-02-23 1:56 ` xuejiufei
2018-02-23 14:23 ` Tejun Heo
2018-02-24 1:45 ` Joseph Qi
2018-02-27 3:18 ` Joseph Qi
2018-02-27 18:33 ` Tejun Heo
2018-02-28 6:52 ` Joseph Qi
2018-03-04 20:23 ` Tejun Heo
2018-03-05 1:17 ` Joseph Qi [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=4f282c16-d8ce-783e-b274-0dbf28cf340a@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=caspar@linux.alibaba.com \
--cc=cgroups@vger.kernel.org \
--cc=jiufei.xue@linux.alibaba.com \
--cc=linux-block@vger.kernel.org \
--cc=tj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox