From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753091Ab2IIGai (ORCPT ); Sun, 9 Sep 2012 02:30:38 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:56595 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752427Ab2IIGag (ORCPT ); Sun, 9 Sep 2012 02:30:36 -0400 Date: Sat, 8 Sep 2012 23:30:31 -0700 From: Tejun Heo To: Lai Jiangshan Cc: Lai Jiangshan , linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/7 V6] workqueue: fix idle worker depletion Message-ID: <20120909063031.GA15530@dhcp-172-17-108-109.mtv.corp.google.com> References: <1347124383-18723-1-git-send-email-laijs@cn.fujitsu.com> <1347124383-18723-5-git-send-email-laijs@cn.fujitsu.com> <20120908174044.GD10788@dhcp-172-17-108-109.mtv.corp.google.com> <20120908175354.GH10788@dhcp-172-17-108-109.mtv.corp.google.com> <20120908181107.GJ10788@dhcp-172-17-108-109.mtv.corp.google.com> <20120908190204.GA12773@dhcp-172-17-108-109.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Lai. On Sun, Sep 09, 2012 at 12:09:58PM +0800, Lai Jiangshan wrote: > > mutex_lock(&pool->manager_mutex); > > if (worker_maybe_bind_and_lock(worker)) > > worker_clr_flags(worker, WORKER_UNBOUND); > > ret = true; > > > > > This code is correct. worker_maybe_bind_and_lock() can be called any time. > but I like to call it only when it is really needed. Ummm... that code is complex for no reason. It isn't easier to read or better in any way. Given the recent exchanges, it seems our tastes differ greatly. Can you please just refresh the two patches as requested and repost them on top of for-3.6-fixes? Thanks. -- tejun