From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758222Ab1I3I5V (ORCPT ); Fri, 30 Sep 2011 04:57:21 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:41071 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754038Ab1I3I5S (ORCPT ); Fri, 30 Sep 2011 04:57:18 -0400 Date: Fri, 30 Sep 2011 01:57:14 -0700 From: Tejun Heo To: Ripduman Sohan Cc: Gilad Ben-Yossef , linux-kernel@vger.kernel.org, peterz@infradead.org Subject: Re: [PATCH] workqueue: Restore cpus_allowed mask for sleeping workqueue rescue threads Message-ID: <20110930085714.GB23868@mtj.dyndns.org> References: <1314884193-20454-1-git-send-email-ripduman.sohan@cl.cam.ac.uk> <20110902002917.GD2752@htj.dyndns.org> <20110915161430.GE1548@tusker> <20110924030718.GA29319@htj.dyndns.org> <20110930080914.GM10425@mtj.dyndns.org> <20110930085421.GA11756@tusker> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110930085421.GA11756@tusker> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 30, 2011 at 09:54:21AM +0100, Ripduman Sohan wrote: > Tejun Heo wrote: > > > Hmmm... indeed. This can cause an unnecessary wakeup / migration on > > an isolated CPU when another CPU asks for the rescuer, so yeah it > > makes sense to change the behavior. BTW, why didn't the original > > patch simply use set_cpus_allowed_ptr(cpu_all_mask)? > > > > Because while at present all (bound) rescuer threads have an > associated workqueue on each CPU, I didn't want to assume this > arrangement would _always_ be the case. It was my thinking that for > bound threads, iterating over the CPUs to only set those that have > an associated workqueue for the rescuer would insulate agsinst any > future case where rescuer threads may be bound to a subset of CPUs. On which CPU a rescuer is doesn't matter at all. Using cpu_all_mask is good enough. Thank you. -- tejun