From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753342AbcAGMk7 (ORCPT ); Thu, 7 Jan 2016 07:40:59 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:20301 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753307AbcAGMkz (ORCPT ); Thu, 7 Jan 2016 07:40:55 -0500 From: wanghaibin To: CC: , , , wanghaibin Subject: [RFC PATCH 1/4] workqueue: move the wq_update_unbound_numa_attrs_buf allocation location. Date: Thu, 7 Jan 2016 20:38:56 +0800 Message-ID: <1452170339-26748-2-git-send-email-wanghaibin.wang@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1452170339-26748-1-git-send-email-wanghaibin.wang@huawei.com> References: <1452170339-26748-1-git-send-email-wanghaibin.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.27.144] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.568E5CCB.004F,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 77a6c789a8a14ad293231a36f2de6075 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org the wq_update_unbound_numa_attrs_buf will be useful, only when the wq_numa_enabled is true. if there is something wrong to cause the wq_numa_enable false, it can just return without the wq_update_unbound_numa_attrs_buf allocation. This doesn't introduce any functional changes. Signed-off-by: wanghaibin --- kernel/workqueue.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index c579dba..d6cbe3d 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5180,9 +5180,6 @@ static void __init wq_numa_init(void) return; } - wq_update_unbound_numa_attrs_buf = alloc_workqueue_attrs(GFP_KERNEL); - BUG_ON(!wq_update_unbound_numa_attrs_buf); - /* * We want masks of possible CPUs of each node which isn't readily * available. Build one from cpu_to_node() which should have been @@ -5207,6 +5204,9 @@ static void __init wq_numa_init(void) wq_numa_possible_cpumask = tbl; wq_numa_enabled = true; + + wq_update_unbound_numa_attrs_buf = alloc_workqueue_attrs(GFP_KERNEL); + BUG_ON(!wq_update_unbound_numa_attrs_buf); } static int __init init_workqueues(void) -- 1.8.3.1