Re: cpu stopper threads and setaffinity leads to deadlock

2018-08-03 Thread Sodagudi Prasad
On 2018-08-03 04:41, Thomas Gleixner wrote: Prasad. On Thu, 2 Aug 2018, Peter Zijlstra wrote: So why didn't you do the 'obvious' parallel to what you did for cpu_stop_queue_two_works(), namely: Is that patch fixing the issue for you? Hi Thomas and Peter, Yes. Tested both versions of patch

Re: cpu stopper threads and setaffinity leads to deadlock

2018-08-03 Thread Thomas Gleixner
Prasad. On Thu, 2 Aug 2018, Peter Zijlstra wrote: > > So why didn't you do the 'obvious' parallel to what you did for > cpu_stop_queue_two_works(), namely: Is that patch fixing the issue for you? > --- a/kernel/stop_machine.c > +++ b/kernel/stop_machine.c > @@ -81,6 +81,7 @@ static bool cpu_sto

Re: cpu stopper threads and setaffinity leads to deadlock

2018-08-02 Thread Peter Zijlstra
On Wed, Aug 01, 2018 at 06:34:40PM -0700, Sodagudi Prasad wrote: > Due to cross migration of tasks between cpu7 and cpu3, migration/7 has > started executing and waits for the migration/3 task, so that they can > proceed within the multi cpu stop state machine together. > Unfortunately stress-ng-af

Re: cpu stopper threads and setaffinity leads to deadlock

2018-08-02 Thread Peter Zijlstra
On Wed, Aug 01, 2018 at 06:34:40PM -0700, Sodagudi Prasad wrote: > the Linux-4.14.56 kernel. Can you also please run on something recent...

Re: cpu stopper threads and setaffinity leads to deadlock

2018-08-02 Thread Mike Galbraith
On Thu, 2018-08-02 at 10:12 +0200, Peter Zijlstra wrote: > On Wed, Aug 01, 2018 at 06:34:40PM -0700, Sodagudi Prasad wrote: > > diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c > > index e190d1e..f932e1e 100644 > > --- a/kernel/stop_machine.c > > +++ b/kernel/stop_machine.c > > @@ -87,9 +

Re: cpu stopper threads and setaffinity leads to deadlock

2018-08-02 Thread Peter Zijlstra
On Wed, Aug 01, 2018 at 06:34:40PM -0700, Sodagudi Prasad wrote: > diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c > index e190d1e..f932e1e 100644 > --- a/kernel/stop_machine.c > +++ b/kernel/stop_machine.c > @@ -87,9 +87,9 @@ static bool cpu_stop_queue_work(unsigned int cpu, struct > cp

cpu stopper threads and setaffinity leads to deadlock

2018-08-01 Thread Sodagudi Prasad
Hi Peter and Tglx, We are observing another deadlock issue due to commit 0b26351b91(stop_machine, sched: Fix migrate_swap() vs. active_balance() deadlock), even after taking the following fix https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1740526.html on the Linux-4.14.56 kernel