lkml.org 
[lkml]   [2011]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2011-06-16 20:31    [W:0.930 / U:1.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site