[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADT32eJPAty_yGA5UGZV9h7XHN_8Sn70v1vhRRn7+URvU+URGA@mail.gmail.com>
Date: Tue, 24 Jun 2014 16:37:58 -0500
From: Shirish Pargaonkar <shirishpargaonkar@...il.com>
To: Tejun Heo <tj@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, vgoyal@...hat.com,
Shirish Pargaonkar <spargaonkar@...e.com>, axboe@...nel.dk
Subject: Re: [PATCH] blkio: Release blkg infrastructure only after last policy
is deactivated.
When we start from blk_cleanup_queue(), we put request queue in bypass mode,
drain it (and service queues), and then destroy blkcgs (explicitly)
When we start from blk_release_queue(), we do not drain first and then
destroy blkcgs. So if we destroy blkcg and then call (implicitly) and
bail out of
blk_drain_queue, we would not have drained the service queues which
is not what we want.
I do not see any harm in waiting till end to release blkcgs (as I understand).
Regards,
Shirish
On Tue, Jun 24, 2014 at 4:09 PM, Tejun Heo <tj@...nel.org> wrote:
> Hello,
>
> On Mon, Jun 23, 2014 at 01:52:25PM -0500, shirishpargaonkar@...il.com wrote:
>> From: Shirish Pargaonkar <spargaonkar@...e.com>
>>
>> Release blkg infrastructure only after last policy is deactivated
>> (i.e. let blkg_destroy_all() be called only from blkcg_deactivate_policy())
>>
>> Otherwise, module can oops because root_blkg gets assigned NULL during
>> cleanup and we attempt draining the service queues via root_blkg afterwords.
>
> I'm not sure this fix makes sense. Cleanup path oopses on an already
> freed resource. How can the solution be not freeing? Why not simply
> make blkcg_drain_queue() bail if the blkgs are all destroyed? The
> whole thing is fully synchronized with the queuelock, right?
>
> Can you please also cc Jens when you post the next iteration?
>
> Thanks.
>
> --
> tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists