Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752995AbbDAPwS (ORCPT ); Wed, 1 Apr 2015 11:52:18 -0400 Received: from mail-qc0-f179.google.com ([209.85.216.179]:33587 "EHLO mail-qc0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752968AbbDAPwP (ORCPT ); Wed, 1 Apr 2015 11:52:15 -0400 Date: Wed, 1 Apr 2015 11:52:12 -0400 From: Tejun Heo To: Lai Jiangshan Cc: Frederic Weisbecker , linux-kernel@vger.kernel.org, Christoph Lameter , Kevin Hilman , Mike Galbraith , "Paul E. McKenney" , Viresh Kumar Subject: Re: [PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask Message-ID: <20150401155212.GO9974@htj.duckdns.org> References: <1426136412-7594-1-git-send-email-laijs@cn.fujitsu.com> <1426653617-3240-1-git-send-email-laijs@cn.fujitsu.com> <1426653617-3240-5-git-send-email-laijs@cn.fujitsu.com> <20150324173120.GI3880@htj.duckdns.org> <551A50DC.6060904@cn.fujitsu.com> <551BAD5A.2070205@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551BAD5A.2070205@cn.fujitsu.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1271 Lines: 32 On Wed, Apr 01, 2015 at 04:33:30PM +0800, Lai Jiangshan wrote: > The missing case: > (@L & @U) is not empty but (@L & @U @O) is empty. > > In my old code (V5 patchset), the dfl_pwq uses (@L & @U), the scheduler will > use cpu_possible_mask instead due to there is no cpu onlined among all cpu in (@L & @U). > It is bad, the pwq is NOT controlled by @L nor @U now. > > I think we may use @U for the dfl_pwq in this case. But it will introduces > a problem: > > When (@L & @U) has online cpu, the dfl_pwq's cpumaks is (@L & @U). > when (@L & @U) has no online cpu, the dfl_pwq's cpumask is @U. > It means dfl_pwq may need to be reallocated during the cpuhotplug-add/remove > and it means wq_update_unbound_numa() can fail. > > Frederic, TJ, any comments about this case? > TJ, would you like to make wq_update_unbound_numa() be failure-able? The goal is making @L behave as cpu_possible_mask for workqueues, right? If @L & @U is empty, fallback to @L. If @L & @O is empty, leave it to the scheduler. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/