[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110616182805.GD2611@htj.dyndns.org>
Date: Thu, 16 Jun 2011 20:28:05 +0200
From: Tejun Heo <tj@...nel.org>
To: Suresh Siddha <suresh.b.siddha@...el.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
"x86@...nel.org" <x86@...nel.org>, "mingo@...e.hu" <mingo@...e.hu>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] stop_machine: kill __stop_machine()
Hello,
On Thu, Jun 16, 2011 at 11:17:40AM -0700, Suresh Siddha wrote:
> On Thu, 2011-06-16 at 10:55 -0700, Peter Zijlstra wrote:
> > the caller already did get_online_cpus(),
> >
> > do_optimize_kprobes()
> > get_online_cpus()
> > arch_optimize_kprobes()
> > text_poke_smp_batch()
> > put_online_cpus()
Peter, I don't think it's that simple. get_online_cpus() itself can't
create circular dependency by itself. It allows recursing. The chain
involves cpu_hotplug_begin() which returns with hotplug mutex held.
> So the circular dependency reported is not possible in practice right?
>
> Above patch is working around a false positive.
But I don't think the lockdep warning is spurious. text_mutex ->
hotplug.lock dependency is created during kprobe patching.
hotplug.lock -> smp_alt during CPU hotplug, and then the alternative
code calling get_online_cpus() creates reverse dependency through
get_online_cpus(). So, the reasoning and comment are wrong but
grapping hotplug mutex there does create a circular dependency.
This probably can be resolved in prettier way but let's leave it alone
for now.
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