Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-07-15 Thread Tejun Heo
On Fri, Jul 15, 2016 at 03:30:41PM +1000, Michael Ellerman wrote: > It looks like this still hasn't gone to Linus for 4.7? > > Could it please, it's a pretty nasty regression on our boxes. Sorry about that. Just sent out the pull request. Thanks. -- tejun

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-07-15 Thread Tejun Heo
On Fri, Jul 15, 2016 at 03:30:41PM +1000, Michael Ellerman wrote: > It looks like this still hasn't gone to Linus for 4.7? > > Could it please, it's a pretty nasty regression on our boxes. Sorry about that. Just sent out the pull request. Thanks. -- tejun

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-07-14 Thread Gautham R Shenoy
Hi Tejun, On Thu, Jun 16, 2016 at 03:39:05PM -0400, Tejun Heo wrote: > On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote: > > Subject: workqueue: Fix setting affinity of unbound worker threads > > From: Peter Zijlstra > > Date: Thu Jun 16 14:38:42 CEST 2016 > >

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-07-14 Thread Gautham R Shenoy
Hi Tejun, On Thu, Jun 16, 2016 at 03:39:05PM -0400, Tejun Heo wrote: > On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote: > > Subject: workqueue: Fix setting affinity of unbound worker threads > > From: Peter Zijlstra > > Date: Thu Jun 16 14:38:42 CEST 2016 > > > > With commit

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Michael Ellerman
On Thu, 2016-06-16 at 15:39 -0400, Tejun Heo wrote: > On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote: > > Subject: workqueue: Fix setting affinity of unbound worker threads > > From: Peter Zijlstra > > Date: Thu Jun 16 14:38:42 CEST 2016 > > > > With commit

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Michael Ellerman
On Thu, 2016-06-16 at 15:39 -0400, Tejun Heo wrote: > On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote: > > Subject: workqueue: Fix setting affinity of unbound worker threads > > From: Peter Zijlstra > > Date: Thu Jun 16 14:38:42 CEST 2016 > > > > With commit e9d867a67fd03ccc

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Tejun Heo
On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote: > Subject: workqueue: Fix setting affinity of unbound worker threads > From: Peter Zijlstra > Date: Thu Jun 16 14:38:42 CEST 2016 > > With commit e9d867a67fd03ccc ("sched: Allow per-cpu kernel threads to > run

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Tejun Heo
On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote: > Subject: workqueue: Fix setting affinity of unbound worker threads > From: Peter Zijlstra > Date: Thu Jun 16 14:38:42 CEST 2016 > > With commit e9d867a67fd03ccc ("sched: Allow per-cpu kernel threads to > run on online &&

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Peter Zijlstra
On Thu, Jun 16, 2016 at 10:11:24PM +1000, Michael Ellerman wrote: > Peterz do you want to send a SOB'ed patch, or can we take what you posted and > add your SOB? So I took Ego's first patch, so as to not steal his credits take that one and then see below. --- Subject: workqueue: Fix setting

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Peter Zijlstra
On Thu, Jun 16, 2016 at 10:11:24PM +1000, Michael Ellerman wrote: > Peterz do you want to send a SOB'ed patch, or can we take what you posted and > add your SOB? So I took Ego's first patch, so as to not steal his credits take that one and then see below. --- Subject: workqueue: Fix setting

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Michael Ellerman
On Wed, 2016-06-15 at 12:01 -0400, Tejun Heo wrote: > On Wed, Jun 15, 2016 at 03:14:15PM +0200, Peter Zijlstra wrote: > > On Wed, Jun 15, 2016 at 06:20:33PM +0530, Gautham R Shenoy wrote: > > > We will no longer have the optimization in > > > restore_unbound_workers_cpumask() but I suppose we

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-16 Thread Michael Ellerman
On Wed, 2016-06-15 at 12:01 -0400, Tejun Heo wrote: > On Wed, Jun 15, 2016 at 03:14:15PM +0200, Peter Zijlstra wrote: > > On Wed, Jun 15, 2016 at 06:20:33PM +0530, Gautham R Shenoy wrote: > > > We will no longer have the optimization in > > > restore_unbound_workers_cpumask() but I suppose we

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Tejun Heo
Hello, On Wed, Jun 15, 2016 at 03:14:15PM +0200, Peter Zijlstra wrote: > On Wed, Jun 15, 2016 at 06:20:33PM +0530, Gautham R Shenoy wrote: > > We will no longer have the optimization in > > restore_unbound_workers_cpumask() but I suppose we don't lose much by > > resetting the affinity every time

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Tejun Heo
Hello, On Wed, Jun 15, 2016 at 03:14:15PM +0200, Peter Zijlstra wrote: > On Wed, Jun 15, 2016 at 06:20:33PM +0530, Gautham R Shenoy wrote: > > We will no longer have the optimization in > > restore_unbound_workers_cpumask() but I suppose we don't lose much by > > resetting the affinity every time

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Peter Zijlstra
On Wed, Jun 15, 2016 at 06:20:33PM +0530, Gautham R Shenoy wrote: > We will no longer have the optimization in > restore_unbound_workers_cpumask() but I suppose we don't lose much by > resetting the affinity every time a CPU in the pool->attr->cpumask > comes online. Right; optimizing hotplug

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Peter Zijlstra
On Wed, Jun 15, 2016 at 06:20:33PM +0530, Gautham R Shenoy wrote: > We will no longer have the optimization in > restore_unbound_workers_cpumask() but I suppose we don't lose much by > resetting the affinity every time a CPU in the pool->attr->cpumask > comes online. Right; optimizing hotplug

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Gautham R Shenoy
On Wed, Jun 15, 2016 at 01:32:49PM +0200, Peter Zijlstra wrote: > On Wed, Jun 15, 2016 at 03:49:36PM +0530, Gautham R Shenoy wrote: > > > Also, with the first patch in the series (which ensures that > > restore_unbound_workers are called *after* the new workers for the > > newly onlined CPUs are

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Gautham R Shenoy
On Wed, Jun 15, 2016 at 01:32:49PM +0200, Peter Zijlstra wrote: > On Wed, Jun 15, 2016 at 03:49:36PM +0530, Gautham R Shenoy wrote: > > > Also, with the first patch in the series (which ensures that > > restore_unbound_workers are called *after* the new workers for the > > newly onlined CPUs are

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Peter Zijlstra
On Wed, Jun 15, 2016 at 03:49:36PM +0530, Gautham R Shenoy wrote: > Also, with the first patch in the series (which ensures that > restore_unbound_workers are called *after* the new workers for the > newly onlined CPUs are created) and without this one, you can > reproduce this WARN_ON on both

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Peter Zijlstra
On Wed, Jun 15, 2016 at 03:49:36PM +0530, Gautham R Shenoy wrote: > Also, with the first patch in the series (which ensures that > restore_unbound_workers are called *after* the new workers for the > newly onlined CPUs are created) and without this one, you can > reproduce this WARN_ON on both

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Gautham R Shenoy
Hi Peter, On Tue, Jun 14, 2016 at 01:22:34PM +0200, Peter Zijlstra wrote: > On Tue, Jun 07, 2016 at 08:44:03PM +0530, Gautham R. Shenoy wrote: > > I'm still puzzled why we don't see this on x86. Afaict there's nothing > PPC specific about this. You are right. On PPC, at boot time we hit the

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Gautham R Shenoy
Hi Peter, On Tue, Jun 14, 2016 at 01:22:34PM +0200, Peter Zijlstra wrote: > On Tue, Jun 07, 2016 at 08:44:03PM +0530, Gautham R. Shenoy wrote: > > I'm still puzzled why we don't see this on x86. Afaict there's nothing > PPC specific about this. You are right. On PPC, at boot time we hit the

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-14 Thread Peter Zijlstra
On Tue, Jun 07, 2016 at 08:44:03PM +0530, Gautham R. Shenoy wrote: I'm still puzzled why we don't see this on x86. Afaict there's nothing PPC specific about this. > This patch sets the affinity of the worker to > a) the only online CPU in the cpumask of the worker pool when it comes >online.

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-14 Thread Peter Zijlstra
On Tue, Jun 07, 2016 at 08:44:03PM +0530, Gautham R. Shenoy wrote: I'm still puzzled why we don't see this on x86. Afaict there's nothing PPC specific about this. > This patch sets the affinity of the worker to > a) the only online CPU in the cpumask of the worker pool when it comes >online.

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-08 Thread Abdul Haleem
Hi Gautham, Thanks a lot for the fix. With your patches applied, 4.7.0-rc2 builds fine on ppc64le bare metal. Boot was successful with No call traces. Thanks for all your support ! Regard's Abdul On Tuesday 07 June 2016 08:44 PM, Gautham R. Shenoy wrote: With commit e9d867a67fd03ccc

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-08 Thread Abdul Haleem
Hi Gautham, Thanks a lot for the fix. With your patches applied, 4.7.0-rc2 builds fine on ppc64le bare metal. Boot was successful with No call traces. Thanks for all your support ! Regard's Abdul On Tuesday 07 June 2016 08:44 PM, Gautham R. Shenoy wrote: With commit e9d867a67fd03ccc

[PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-07 Thread Gautham R. Shenoy
With commit e9d867a67fd03ccc ("sched: Allow per-cpu kernel threads to run on online && !active"), __set_cpus_allowed_ptr() expects that only strict per-cpu kernel threads can have affinity to an online CPU which is not yet active. This assumption is currently broken in the CPU_ONLINE notification

[PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-07 Thread Gautham R. Shenoy
With commit e9d867a67fd03ccc ("sched: Allow per-cpu kernel threads to run on online && !active"), __set_cpus_allowed_ptr() expects that only strict per-cpu kernel threads can have affinity to an online CPU which is not yet active. This assumption is currently broken in the CPU_ONLINE notification