From: "tj@kernel.org" <tj@kernel.org>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "hch@lst.de" <hch@lst.de>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"00moses.alexander00@gmail.com" <00moses.alexander00@gmail.com>,
"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH] block: Ensure that a request queue is dissociated from the cgroup controller
Date: Thu, 12 Apr 2018 09:12:47 -0700 [thread overview]
Message-ID: <20180412161247.GD793541@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <beafd7bc4f2fdb7e672ad97e57ff4f82464182da.camel@wdc.com>
Hello,
On Thu, Apr 12, 2018 at 04:03:52PM +0000, Bart Van Assche wrote:
> On Thu, 2018-04-12 at 08:37 -0700, Tejun Heo wrote:
> > On Thu, Apr 12, 2018 at 08:09:17AM -0600, Bart Van Assche wrote:
> > > I have retested hotunplugging by rerunning the srp-test software. It
> > > seems like you overlooked that this patch does not remove the
> > > blkcg_exit_queue() call from blk_cleanup_queue()? If a device is
> > > hotunplugged it is up to the block driver to call
> > > blk_cleanup_queue(). And blk_cleanup_queue() will call
> > > blkcg_exit_queue().
> >
> > Hmm... what'd prevent blg_lookup_and_create() racing against that?
>
> Hello Tejun,
>
> Did you perhaps mean blkg_lookup_create()? That function has one caller,
Ah yeah, sorry about the sloppiness.
> namely blkcg_bio_issue_check(). The only caller of that function is
> generic_make_request_checks(). A patch was posted on the linux-block mailing
> list recently that surrounds that call with blk_queue_enter() / blk_queue_exit().
> I think that prevents that blkcg_exit_queue() is called concurrently with
> blkg_lookup_create().
Yeah, that'd solve the problem for that particular path, but what
that's doing is adding another layer of refcnting which is used to
implement the revoke (or sever) semantics. This is a fragile approach
tho because it isn't clear who's protecting what and there's nothing
in blkg's usage which suggests it'd be protected that way and we're
basically working around a different underlying problem (lock
switching) by expanding the coverage of a different lock.
I'd much prefer fixing the lock switching problem properly than
working around that shortcoming this way.
Thans.
--
tejun
next prev parent reply other threads:[~2018-04-12 16:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-12 1:58 [PATCH] block: Ensure that a request queue is dissociated from the cgroup controller Bart Van Assche
2018-04-12 4:20 ` Alexandru Moise
2018-04-12 4:32 ` Alexandru Moise
2018-04-12 4:22 ` Alexandru Moise
2018-04-12 5:34 ` Christoph Hellwig
2018-04-12 11:52 ` Bart Van Assche
2018-04-12 13:14 ` hch
2018-04-12 13:48 ` tj
2018-04-12 13:56 ` hch
2018-04-12 13:58 ` tj
2018-04-12 14:07 ` tj
2018-04-12 13:51 ` Tejun Heo
2018-04-12 14:09 ` Bart Van Assche
2018-04-12 15:37 ` Tejun Heo
2018-04-12 16:03 ` Bart Van Assche
2018-04-12 16:12 ` tj [this message]
2018-04-12 16:29 ` Bart Van Assche
2018-04-12 18:11 ` tj
2018-04-12 18:56 ` Bart Van Assche
2018-04-12 19:09 ` tj
2018-04-12 22:40 ` Bart Van Assche
2018-04-13 15:18 ` tj
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=20180412161247.GD793541@devbig577.frc2.facebook.com \
--to=tj@kernel.org \
--cc=00moses.alexander00@gmail.com \
--cc=Bart.VanAssche@wdc.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.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;
as well as URLs for NNTP newsgroup(s).