Re: WARNING: possible circular locking dependency detected

2017-09-01 Thread Peter Zijlstra
On Thu, Aug 31, 2017 at 11:24:13PM +0200, Thomas Gleixner wrote: > On Thu, 31 Aug 2017, Thomas Gleixner wrote: > > On Thu, 31 Aug 2017, Peter Zijlstra wrote: > > > > > On Thu, Aug 31, 2017 at 09:55:57AM +0200, Thomas Gleixner wrote: > > > > > Arghh!!! > > > > > > > > > > And allowing us to create

Re: WARNING: possible circular locking dependency detected

2017-08-31 Thread Thomas Gleixner
On Thu, 31 Aug 2017, Thomas Gleixner wrote: > On Thu, 31 Aug 2017, Peter Zijlstra wrote: > > > On Thu, Aug 31, 2017 at 09:55:57AM +0200, Thomas Gleixner wrote: > > > > Arghh!!! > > > > > > > > And allowing us to create events for offline CPUs (possible I think, but > > > > maybe slightly tricky)

Re: WARNING: possible circular locking dependency detected

2017-08-31 Thread Thomas Gleixner
On Thu, 31 Aug 2017, Peter Zijlstra wrote: > On Thu, Aug 31, 2017 at 09:55:57AM +0200, Thomas Gleixner wrote: > > > Arghh!!! > > > > > > And allowing us to create events for offline CPUs (possible I think, but > > > maybe slightly tricky) won't solve that, because we're already holding > > > the

Re: WARNING: possible circular locking dependency detected

2017-08-31 Thread Peter Zijlstra
On Thu, Aug 31, 2017 at 09:55:57AM +0200, Thomas Gleixner wrote: > > Arghh!!! > > > > And allowing us to create events for offline CPUs (possible I think, but > > maybe slightly tricky) won't solve that, because we're already holding > > the hotplug_lock during PREPARE. > > There are two ways to

Re: WARNING: possible circular locking dependency detected

2017-08-31 Thread Thomas Gleixner
On Thu, 31 Aug 2017, Peter Zijlstra wrote: > On Thu, Aug 31, 2017 at 09:08:05AM +0200, Thomas Gleixner wrote: > > On Wed, 30 Aug 2017, Peter Zijlstra wrote: > > > On offline it basically does perf_event_disable() for all CPU context > > > events, and then adds HOTPLUG_OFFSET (-32) to arrive at: OFF

Re: WARNING: possible circular locking dependency detected

2017-08-31 Thread Peter Zijlstra
On Thu, Aug 31, 2017 at 09:08:05AM +0200, Thomas Gleixner wrote: > On Wed, 30 Aug 2017, Peter Zijlstra wrote: > > On offline it basically does perf_event_disable() for all CPU context > > events, and then adds HOTPLUG_OFFSET (-32) to arrive at: OFF + > > HOTPLUG_OFFSET = -33. > > > > That's smalle

Re: WARNING: possible circular locking dependency detected

2017-08-31 Thread Thomas Gleixner
On Wed, 30 Aug 2017, Peter Zijlstra wrote: > On offline it basically does perf_event_disable() for all CPU context > events, and then adds HOTPLUG_OFFSET (-32) to arrive at: OFF + > HOTPLUG_OFFSET = -33. > > That's smaller than ERROR and thus perf_event_enable() no-ops on events > for offline CPUs

Re: WARNING: possible circular locking dependency detected

2017-08-29 Thread Peter Zijlstra
On Tue, Aug 29, 2017 at 10:10:37PM +0200, Thomas Gleixner wrote: > On Tue, 29 Aug 2017, Peter Zijlstra wrote: > > So I have a patch _somewhere_ that preserves the event<->cpu relation > > across hotplug and disable/enable would be sufficient. If you want I can > > try and dig that out and make it w

Re: WARNING: possible circular locking dependency detected

2017-08-29 Thread Thomas Gleixner
On Tue, 29 Aug 2017, Peter Zijlstra wrote: > On Tue, Aug 29, 2017 at 07:40:44PM +0200, Thomas Gleixner wrote: > > > One solution I'm looking into right now is to reverse the lock order and > > actually make the hotplug code do: > > > > watchdog_lock(); > > cpu_write_lock(); > > > >

Re: WARNING: possible circular locking dependency detected

2017-08-29 Thread Peter Zijlstra
On Tue, Aug 29, 2017 at 07:40:44PM +0200, Thomas Gleixner wrote: > One solution I'm looking into right now is to reverse the lock order and > actually make the hotplug code do: > >watchdog_lock(); >cpu_write_lock(); > > >cpu_write_unlock(); >watchdog_u

Re: WARNING: possible circular locking dependency detected

2017-08-29 Thread Peter Zijlstra
On Fri, Aug 25, 2017 at 04:47:55PM +0200, Sebastian Andrzej Siewior wrote: > On 2017-08-25 12:03:04 [+0200], Borislav Petkov wrote: > > == > > WARNING: possible circular locking dependency detected > > 4.13.0-rc6+ #1 Not tainted > > --

Re: WARNING: possible circular locking dependency detected

2017-08-29 Thread Thomas Gleixner
On Mon, 28 Aug 2017, Peter Zijlstra wrote: > What's worse, there's also: > > cpus_write_lock() > ... > takedown_cpu() > smpboot_park_threads() > smpboot_park_thread() > kthread_park() > ->park() := watchdog_disable() > watchdog_nmi_di

Re: WARNING: possible circular locking dependency detected

2017-08-28 Thread Peter Zijlstra
On Mon, Aug 28, 2017 at 05:06:17PM +0200, Peter Zijlstra wrote: > On Mon, Aug 28, 2017 at 04:58:08PM +0200, Peter Zijlstra wrote: > > On Fri, Aug 25, 2017 at 12:03:04PM +0200, Borislav Petkov wrote: > > > Hey, > > > > > > tglx says I have something for ya :-) > > > > > > =

Re: WARNING: possible circular locking dependency detected

2017-08-28 Thread Peter Zijlstra
On Mon, Aug 28, 2017 at 04:58:08PM +0200, Peter Zijlstra wrote: > On Fri, Aug 25, 2017 at 12:03:04PM +0200, Borislav Petkov wrote: > > Hey, > > > > tglx says I have something for ya :-) > > > > == > > WARNING: possible circular locking dependenc

Re: WARNING: possible circular locking dependency detected

2017-08-28 Thread Peter Zijlstra
On Fri, Aug 25, 2017 at 12:03:04PM +0200, Borislav Petkov wrote: > Hey, > > tglx says I have something for ya :-) > > == > WARNING: possible circular locking dependency detected > 4.13.0-rc6+ #1 Not tainted >

Re: WARNING: possible circular locking dependency detected

2017-08-28 Thread Peter Zijlstra
On Fri, Aug 25, 2017 at 04:47:55PM +0200, Sebastian Andrzej Siewior wrote: > On 2017-08-25 12:03:04 [+0200], Borislav Petkov wrote: > | == > | WARNING: possible circular locking dependency detected > | 4.13.0-rc6-00758-gd80d4177391f-dirty #112 Not

Re: WARNING: possible circular locking dependency detected

2017-08-28 Thread Peter Zijlstra
On Fri, Aug 25, 2017 at 04:47:55PM +0200, Sebastian Andrzej Siewior wrote: > On 2017-08-25 12:03:04 [+0200], Borislav Petkov wrote: > > == > > WARNING: possible circular locking dependency detected > > 4.13.0-rc6+ #1 Not tainted > > --

Re: WARNING: possible circular locking dependency detected

2017-08-25 Thread Sebastian Andrzej Siewior
On 2017-08-25 12:03:04 [+0200], Borislav Petkov wrote: > Hey, Hi Borislav, > tglx says I have something for ya :-) :) > == > WARNING: possible circular locking dependency detected > 4.13.0-rc6+ #1 Not tainted > ---

Re: WARNING: possible circular locking dependency detected

2017-08-25 Thread Thomas Gleixner
On Sat, 26 Aug 2017, Byungchul Park wrote: > On Fri, Aug 25, 2017 at 11:47 PM, Sebastian Andrzej Siewior > wrote: > > We hold the sparse_irq_lock lock while waiting for the completion in the > > CPU-down case and in the CPU-up case we acquire the sparse_irq_lock lock > > while the other CPU is wai

Re: WARNING: possible circular locking dependency detected

2017-08-25 Thread Byungchul Park
On Fri, Aug 25, 2017 at 11:47 PM, Sebastian Andrzej Siewior wrote: > On 2017-08-25 12:03:04 [+0200], Borislav Petkov wrote: >> == >> WARNING: possible circular locking dependency detected >> 4.13.0-rc6+ #1 Not tainted >> -

Re: WARNING: possible circular locking dependency detected

2017-08-25 Thread Sebastian Andrzej Siewior
On 2017-08-25 12:03:04 [+0200], Borislav Petkov wrote: > == > WARNING: possible circular locking dependency detected > 4.13.0-rc6+ #1 Not tainted > -- While looking at this, I stumbled upon anot

Re: WARNING: possible circular locking dependency detected

2017-08-25 Thread Borislav Petkov
.config -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. # # Automatically generated file; DO NOT EDIT. # Linux/x86 4.13.0-rc6 Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y CONFIG_X86=y CONFIG_INSTRUCTION_DECODER=y CONFIG_OUTPUT_FORMAT="e