lkml.org 
[lkml]   [2018]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] blk-cgroup: remove entries in blkg_tree before queue release
Date
On Wed, 2018-04-11 at 13:02 -0700, tj@kernel.org wrote:
> On Wed, Apr 11, 2018 at 08:00:29PM +0000, Bart Van Assche wrote:
> > On Wed, 2018-04-11 at 12:57 -0700, tj@kernel.org wrote:
> > > On Wed, Apr 11, 2018 at 01:55:25PM -0600, Bart Van Assche wrote:
> > > > On 04/11/18 13:00, Alexandru Moise wrote:
> > > > > But the root cause of it is in blkcg_init_queue() when blkg_create() returns
> > > > > an ERR ptr, because it tries to insert into a populated index into blkcg->blkg_tree,
> > > > > the entry that we fail to remove at __blk_release_queue().
> > > >
> > > > Hello Alex,
> > > >
> > > > Had you considered something like the untested patch below?
> > >
> > > But queue init shouldn't fail here, right?
> >
> > Hello Tejun,
> >
> > Your question is not entirely clear to me. Are you referring to the atomic
> > allocations in blkg_create() or are you perhaps referring to something else?
>
> Hmm.. maybe I'm confused but I thought that the fact that
> blkcg_init_queue() fails itself is already a bug, which happens
> because a previously destroyed queue left behind blkgs.

Hello Tejun,

I had missed the start of this thread so I was not aware of which problem Alex
was trying to solve. In the description of v1 of this patch I read that Alex
thinks that he ran into a scenario in which blk_queue_alloc_node() assigns a
q->id that is still in use by another request queue? That's weird. The following
code still occurs in __blk_release_queue():

ida_simple_remove(&blk_queue_ida, q->id);

It's not clear to me how that remove call could happen *before* q->id is removed
from the blkcg radix tree.

Bart.



\
 
 \ /
  Last update: 2018-04-11 22:24    [W:0.047 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site