From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754395AbcFPML2 (ORCPT ); Thu, 16 Jun 2016 08:11:28 -0400 Received: from ozlabs.org ([103.22.144.67]:46472 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753892AbcFPML0 (ORCPT ); Thu, 16 Jun 2016 08:11:26 -0400 Message-ID: <1466079084.19127.2.camel@ellerman.id.au> Subject: Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU From: Michael Ellerman To: Tejun Heo , Peter Zijlstra Cc: Gautham R Shenoy , Thomas Gleixner , Abdul Haleem , Aneesh Kumar , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Thu, 16 Jun 2016 22:11:24 +1000 In-Reply-To: <20160615160112.GC24102@mtj.duckdns.org> References: <20160614112234.GF30154@twins.programming.kicks-ass.net> <20160615101936.GA31671@in.ibm.com> <20160615113249.GH30909@twins.programming.kicks-ass.net> <20160615125033.GB31671@in.ibm.com> <20160615131415.GI30909@twins.programming.kicks-ass.net> <20160615160112.GC24102@mtj.duckdns.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 don't lose much by > > > resetting the affinity every time a CPU in the pool->attr->cpumask > > > comes online. > > > > Right; optimizing hotplug really isn't worth it. The code needs to be > > simple and robust (ha! funny). > > The only case it might matter is CPU hotplug being used aggressively > for power saving. No idea how popular that is now tho. > set_cpus_allowed isn't that expensive and phones don't tend to have > massive number of kworkers, so hopefully it won't show up. > > > In any case, Tejun, does this work for you? > > I'm not sure about the reordering part but for setting affinity on > each onlining, no objection. If it ever shows up as performance / > power regression, we can revisit it later. Peterz do you want to send a SOB'ed patch, or can we take what you posted and add your SOB? And Tejun are you happy to merge this for rc4? cheers