Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932604AbbERUVU (ORCPT ); Mon, 18 May 2015 16:21:20 -0400 Received: from mail-qc0-f182.google.com ([209.85.216.182]:34810 "EHLO mail-qc0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932483AbbERUVQ (ORCPT ); Mon, 18 May 2015 16:21:16 -0400 Date: Mon, 18 May 2015 16:21:12 -0400 From: Tejun Heo To: Lai Jiangshan Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/7 V2] workqueue: simplify wq_update_unbound_numa() Message-ID: <20150518202112.GC24861@htj.duckdns.org> References: <1431433955-3173-1-git-send-email-laijs@cn.fujitsu.com> <1431433955-3173-3-git-send-email-laijs@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431433955-3173-3-git-send-email-laijs@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: 1047 Lines: 28 On Tue, May 12, 2015 at 08:32:30PM +0800, Lai Jiangshan wrote: > wq_update_unbound_numa() is known be called with wq_pool_mutex held. > > But wq_update_unbound_numa() requests wq->mutex before reading > wq->unbound_attrs, wq->numa_pwq_tbl[] and wq->dfl_pwq. But these fields > were changed to be allowed being read with wq_pool_mutex held. So we > simply remove the mutex_lock(&wq->mutex). > > Without the dependence on the the mutex_lock(&wq->mutex), the test > of wq->unbound_attrs->no_numa can also be moved upward. > > The old code need a long comment to describe the stableness of > @wq->unbound_attrs which is also guaranteed by wq_pool_mutex now, > so we don't need this such comment. > > Signed-off-by: Lai Jiangshan Applied 1-2 to wq/for-4.2. 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/