From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754618AbcAKF2j (ORCPT ); Mon, 11 Jan 2016 00:28:39 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:39075 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752006AbcAKF2i (ORCPT ); Mon, 11 Jan 2016 00:28:38 -0500 Message-ID: <56933BE1.1060602@huawei.com> Date: Mon, 11 Jan 2016 13:21:37 +0800 From: wanghaibin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Tejun Heo CC: , , Subject: Re: [RFC PATCH 1/4] workqueue: move the wq_update_unbound_numa_attrs_buf allocation location. References: <1452170339-26748-1-git-send-email-wanghaibin.wang@huawei.com> <1452170339-26748-2-git-send-email-wanghaibin.wang@huawei.com> <20160107154850.GA1898@mtj.duckdns.org> In-Reply-To: <20160107154850.GA1898@mtj.duckdns.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.27.144] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.56933BF0.00CD,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 9b45f6c56de82c1b075102d5ac7b6442 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/1/7 23:48, Tejun Heo wrote: > On Thu, Jan 07, 2016 at 08:38:56PM +0800, wanghaibin wrote: >> 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. > > I don't see what the point is with this change. > What I Meant To Say, if (WARN_ON(node == NUMA_NO_NODE)) is true, this cause wq_numa_enabled to be set the false. That is, the wq_update_unbound_numa_attrs_buf will be useless. It can free the the wq_update_unbound_numa_attrs_buf while the WARN_ON condition is true; Or, better way is that only when the wq_numa_enabled is true, we will allocate the wq_update_unbound_numa_attrs_buf; However, just like your said, the WARN_ON condition should never happen, Maybe this change is not useless too :) . > Thanks. >