public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Tejun Heo <tj@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/6] workqueue: simpler&better workers management synchronization
Date: Mon, 21 Apr 2014 09:33:40 +0800	[thread overview]
Message-ID: <53547574.4090207@cn.fujitsu.com> (raw)
In-Reply-To: <53491A85.70004@cn.fujitsu.com>

On 04/12/2014 06:50 PM, Lai Jiangshan wrote:
> Sorry,
> the cover letter was forgotten to send to LKML.

Hi, Tejun

Any comments about the patchset.
(general comments, high level comments)

Thanks.
Lai

> 
> On 04/12/2014 06:45 PM, Lai Jiangshan wrote:
>> Each patches remove codes!
>>
>> Patch1&2 are the basic patches. They add a *united* mechanism for managing
>> percpu pools' workers' & unbound pools' workers' & rescuers' CPUMASK.
>>
>> Patch1&4 make workers-concurrency-enabling atomically when cpu_online()
>> and create_worker(). after this, workers-concurrency-enabling-disabling
>> are all atomically.
>>
>> Old manager_mutex protects:
>> 1) workers creation&destruction
>> 2) workers cpumask managing when cpu_online()/workers-creation
>> 3) workers concurrency enabling&disabling.
>>
>> Now, the above three things' synchronization are separated.
>> 1) We don't need manager_mutex protects workers creation&destruction
>>    1.1) creation is only happened when the cpu is first online, the unbound pool
>> 	is just created, and manage_workers(). they have their one synchronization.
>>    1.2) destruction only happens on idle-timeout handler, protected by pool->lock.
>>    1.3) put_unbound_pool() uses manager_arb&workers_leave(new) to synchronize
>> 	with workers creation&destruction.
>>
>> 2) bind_mutex and bind_list handle all the workers'(percpu,unbound,
>>    normal,rescuer) cpumask when cpu_online()/workers-creation/worker-destrution.
>>    we don't need manager_mutex.
>>
>> 3) pool->lock and worker_idr handle workers concurrency enabling&disabling.
>>
>> Note, bind_list is always a super set of worker_idr, and when cpu-online or
>> workers-creation, cpumask is set at first and then concurrency-enabling.
>> concurrency-management depends on local-wakeup which depends on cpumask
>> is properly set for all the workers.
>>
>> This patchset depends on previous patch:
>> "workqueue: fix possible race condition when rescuer VS pwq-release"
>>
>> Thanks,
>> Lai
>>
>>
>> Lai Jiangshan (6):
>>   workqueue: generic routine to restore percpu/unbound pools' workers'
>>     cpumask
>>   workqueue: generic framework to manage normal&rescuer workers'
>>     cpumask
>>   workqueue: make destroy_worker() atomically
>>   workqueue: commit worker to pool's concurrency setting atomically.
>>   workqueue: remove manager_mutex
>>   workqueue: destroy worker directly in idle timeout handler
>>
>>  kernel/workqueue.c          |  366 ++++++++++++------------------------------
>>  kernel/workqueue_internal.h |    1 +
>>  2 files changed, 106 insertions(+), 261 deletions(-)
>>
> 
> .
> 


  reply	other threads:[~2014-04-21  1:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1397299543-12012-1-git-send-email-laijs@cn.fujitsu.com>
2014-04-12 10:45 ` [PATCH 1/6] workqueue: generic routine to restore percpu/unbound pools' workers' cpumask Lai Jiangshan
2014-04-12 10:45 ` [PATCH 2/6] workqueue: generic framework to manage normal&rescuer " Lai Jiangshan
2014-04-12 10:45 ` [PATCH 3/6] workqueue: make destroy_worker() atomically Lai Jiangshan
2014-04-12 10:45 ` [PATCH 4/6] workqueue: commit worker to pool's concurrency setting atomically Lai Jiangshan
2014-04-12 10:45 ` [PATCH 5/6] workqueue: remove manager_mutex Lai Jiangshan
2014-04-12 10:45 ` [PATCH 6/6] workqueue: destroy worker directly in idle timeout handler Lai Jiangshan
2014-04-12 10:50 ` [PATCH 0/6] workqueue: simpler&better workers management synchronization Lai Jiangshan
2014-04-21  1:33   ` Lai Jiangshan [this message]
2014-04-21 22:34     ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53547574.4090207@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox