On Thu, 2018-04-12 at 09:12 -0700, t...@kernel.org wrote:
> > Did you perhaps mean blkg_lookup_create()? That function has one caller,
> > 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.

Hello Tejun,

Any code that submits a bio or request needs blk_queue_enter() /
blk_queue_exit() anyway. Please have a look at the following commit - you will
see that that commit reduces the number of blk_queue_enter() / blk_queue_exit()
calls in the hot path:

https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?h=for-linus&id=37f9579f4c31a6d698dbf3016d7bf132f9288d30

Thanks,

Bart.


Reply via email to