[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1398646295.3046.30.camel@ThinkPad-T5421>
Date: Mon, 28 Apr 2014 08:51:35 +0800
From: Li Zhong <zhong@...ux.vnet.ibm.com>
To: Tejun Heo <tj@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, gregkh@...uxfoundation.org,
rafael.j.wysocki@...el.com, toshi.kani@...com
Subject: Re: [RFC PATCH v5 1/2] Use lock_device_hotplug() in
cpu_probe_store() and cpu_release_store()
On Fri, 2014-04-25 at 08:28 -0400, Tejun Heo wrote:
> On Fri, Apr 25, 2014 at 09:56:10AM +0800, Li Zhong wrote:
> > > A nests cpu subsys mutex under s_active of the online node. B nests
> > > s_active of the online node under the cpu subsys mutex. What am I
> > > missing?
> >
> > From the above two chain, I think the problem is cpu_subsys_mutex and
> > s_active(online), which is the deadlock we are trying to solve in patch
>
> Yeap, that one was what I was thinking about.
>
> > #2. I seems to me s_active(release) here doesn't have lock issues?
>
> And your patch doesn't change the situation for online.
I'm a little confused here...
To clarify for this patch(#1):
Currently(before patch#2), the s_active(online) and cpu subsys mutex
deadlock is solved by lock_device_hotplug_sysfs(). (lockdep warnings are
still there, so we want to change the implementation of
lock_device_hotplug_sysfs() in patch #2 to take out of s_active_online,
instead of device_hotplug_lock, which is grabbed before cpu subsys
mutex).
But here, for the probe/release, I think we really don't need to use
this _sysfs() version.
So it is replaced with lock_device_hotplug() directly to avoid two
unnecessary conversions of lock_device_hotplug_sysfs(), that otherwise
need to be done in patch #2.
Thanks, Zhong
> Alright,
> thanks a lot for the explanation.
>
--
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