Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933083AbbD1Doq (ORCPT ); Mon, 27 Apr 2015 23:44:46 -0400 Received: from mail-qk0-f169.google.com ([209.85.220.169]:35045 "EHLO mail-qk0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933020AbbD1Doo (ORCPT ); Mon, 27 Apr 2015 23:44:44 -0400 Date: Mon, 27 Apr 2015 23:44:40 -0400 From: Tejun Heo To: Lai Jiangshan Cc: linux-kernel@vger.kernel.org, Christoph Lameter , Kevin Hilman , Mike Galbraith , "Paul E. McKenney" , Viresh Kumar , Frederic Weisbecker Subject: Re: [PATCH 3/3 V8] workqueue: Allow modifying low level unbound workqueue cpumask Message-ID: <20150428034440.GC2152@htj.duckdns.org> References: <1430128720-3021-1-git-send-email-laijs@cn.fujitsu.com> <1430128720-3021-4-git-send-email-laijs@cn.fujitsu.com> <20150427160756.GE1499@htj.duckdns.org> <553EE60C.1040503@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <553EE60C.1040503@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: 1782 Lines: 50 Hello, On Tue, Apr 28, 2015 at 09:44:44AM +0800, Lai Jiangshan wrote: > >> +int workqueue_set_unbound_cpumask(cpumask_var_t cpumask); > > > > Why is this a public function? > > > In V4 patchset, Kevin Hilman had requested the wq_unbound_cpumask > to be "cpumask_complement(wq_unbound_cpumask, tick_nohz_full_mask);" > > I replied against it and I suggested that wq_unbound_cpumask can be > re-set after workqueue initialized it. > > And Frederic Weisbecker seemed on my side: > """ > If it should be the default on NO_HZ_FULL, maybe we should do this from the > tick nohz code. Some late or fs initcall that will do the workqueue affinity, > timer affinity, etc... > """ > > So, we need an API to modify the wq_unbound_cpumask, and I provided > this public function. Otherwise, the other code can't modify it. I see. I don't have too strong an opinion; however, changing the mask is a fairly heavy operation. Are there specific reasons why we don't want to follow the nohz config right away? Also, even if we do it this way, the function doesn't need to be EXPORT_SYMBOL_GPL()'d, right? > > Is the following list_del() necessary? The list is never used again, > > right? > > It isn't necessary. It was added in V7. I thought it could make > the code more normal. The problem with doing unnecessary stuff is that it's bound to be inconsistent and makes the reader wonder whether something else which requires such extra operation is going on when there's none. It tends to mislead than anything else. 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/