[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130320150351.GW3042@htj.dyndns.org>
Date: Wed, 20 Mar 2013 08:03:51 -0700
From: Tejun Heo <tj@...nel.org>
To: Li Zefan <lizefan@...wei.com>
Cc: Oleg Nesterov <oleg@...hat.com>, Dave Jones <davej@...hat.com>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
cgroups@...r.kernel.org
Subject: Re: [PATCH cgroup/for-3.10] cgroup: make cgroup_mutex outer to
threadgroup_lock
On Wed, Mar 20, 2013 at 08:58:08AM +0800, Li Zefan wrote:
> On 2013/3/20 6:02, Tejun Heo wrote:
> > It doesn't make sense to nest cgroup_mutex inside threadgroup_lock
> > when it should be outer to most all locks used by all cgroup
> > controllers. It was nested inside threadgroup_lock only because some
> > controllers were abusing cgroup_mutex inside controllers leading to
> > locking order inversion.
> >
> > cgroup_mutex is no longer abused by controllers and can be put outer
> > to threadgroup_lock. Reverse the locking order in
> > attach_task_by_pid().
> >
>
> But the code contrast to the changelog. ;)
>
> cgroup_mutex is currently outside of threadgroup_lock, and you're making
> it nested inside threadgroup_lock in the code.
Heh heh, thanks for spotting my idiocy. Yeah, the locking order
between the two has been swapped a couple times while writing up the
original threadgroup_lock patch and I misremembered how it was at the
end and got totally confused when writing this patch. Sorry about
that. So, let's leave the locking in cgroup alone. I like
cgroup_mutex to be the outer one.
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