From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752577AbbCNHu3 (ORCPT ); Sat, 14 Mar 2015 03:50:29 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:42876 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750788AbbCNHu1 (ORCPT ); Sat, 14 Mar 2015 03:50:27 -0400 X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="76657933" Message-ID: <5503E8D1.2030909@cn.fujitsu.com> Date: Sat, 14 Mar 2015 15:52:49 +0800 From: Lai Jiangshan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Kevin Hilman CC: , Frederic Weisbecker , Christoph Lameter , Mike Galbraith , "Paul E. McKenney" , Tejun Heo , Viresh Kumar Subject: Re: [PATCH 3/4] workqueue: Create low-level unbound workqueues cpumask References: <1426136412-7594-1-git-send-email-laijs@cn.fujitsu.com> <1426136412-7594-4-git-send-email-laijs@cn.fujitsu.com> <7h4mpopie6.fsf@deeprootsystems.com> In-Reply-To: <7h4mpopie6.fsf@deeprootsystems.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.37] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/14/2015 07:49 AM, Kevin Hilman wrote: > Lai Jiangshan writes: > >> From: Frederic Weisbecker >> >> Create a cpumask that limit the affinity of all unbound workqueues. >> This cpumask is controlled though a file at the root of the workqueue >> sysfs directory. >> >> It works on a lower-level than the per WQ_SYSFS workqueues cpumask files >> such that the effective cpumask applied for a given unbound workqueue is >> the intersection of /sys/devices/virtual/workqueue/$WORKQUEUE/cpumask and >> the new /sys/devices/virtual/workqueue/cpumask_unbounds file. >> >> This patch implements the basic infrastructure and the read interface. >> cpumask_unbounds is initially set to cpu_possible_mask. >> >> Cc: Christoph Lameter >> Cc: Kevin Hilman >> Cc: Lai Jiangshan >> Cc: Mike Galbraith >> Cc: Paul E. McKenney >> Cc: Tejun Heo >> Cc: Viresh Kumar >> Signed-off-by: Frederic Weisbecker >> Signed-off-by: Lai Jiangshan > > [...] > >> @@ -5094,6 +5116,9 @@ static int __init init_workqueues(void) >> >> WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long)); >> >> + BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL)); >> + cpumask_copy(wq_unbound_cpumask, cpu_possible_mask); >> + > > As I mentioned in an earlier discussion[1], I still think this could > default too the housekeeping CPUs in the NO_HZ_FULL case: > > #ifdef CONFIG_NO_HZ_FULL > cpumask_complement(wq_unbound_cpumask, tick_nohz_full_mask); No, the default/booted wq_unbound_cpumask should be cpu_possible_mask. > #else > cpumask_copy(wq_unbound_cpumask, cpu_possible_mask); > #endif > > But that could also be left to a future optimization as well. > > Kevin > > [1] https://lkml.org/lkml/2014/2/14/666 > . >