Re: [PATCH 0/8] workqueue: advance concurrency management

2013-04-20 Thread Lai Jiangshan
On Sat, Apr 20, 2013 at 2:11 AM, Tejun Heo  wrote:
> Hey,
>
> On Fri, Apr 19, 2013 at 06:10:57AM +0800, Lai Jiangshan wrote:
>> Ping.
>
> Sorry, I've been at collab summit / lsf.  Plus, it's a bit too late
> for for-3.10 anyway.  Anyways, after glancing over it, here are my
> preliminary thoughts.  The first one looks good but I'm not sure about
> dropping nr_running adjustment.  The only real benefit coming from
> that is dropping a sched callback and if there's any performance /
> overhead impact, I'm afraid it's gonna be negative.  There are actual
> benefits in using as few tasks as possible -

waking_up() callback doesn't win too much in this.


> the cache footprint gets smaller,

cache footprint also be reduced in different way in the patchset.
and memory atomic operations are reduced.

> so unless there's a clear indication that the suggested

Only simple.
and remove the optimization from rare cases.

> behavior is better in some way, I'm not sure what we're buying with
> the proposed changes.
>
> Thanks.
>
> --
> tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/8] workqueue: advance concurrency management

2013-04-20 Thread Lai Jiangshan
On Sat, Apr 20, 2013 at 2:11 AM, Tejun Heo t...@kernel.org wrote:
 Hey,

 On Fri, Apr 19, 2013 at 06:10:57AM +0800, Lai Jiangshan wrote:
 Ping.

 Sorry, I've been at collab summit / lsf.  Plus, it's a bit too late
 for for-3.10 anyway.  Anyways, after glancing over it, here are my
 preliminary thoughts.  The first one looks good but I'm not sure about
 dropping nr_running adjustment.  The only real benefit coming from
 that is dropping a sched callback and if there's any performance /
 overhead impact, I'm afraid it's gonna be negative.  There are actual
 benefits in using as few tasks as possible -

waking_up() callback doesn't win too much in this.


 the cache footprint gets smaller,

cache footprint also be reduced in different way in the patchset.
and memory atomic operations are reduced.

 so unless there's a clear indication that the suggested

Only simple.
and remove the optimization from rare cases.

 behavior is better in some way, I'm not sure what we're buying with
 the proposed changes.

 Thanks.

 --
 tejun
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/8] workqueue: advance concurrency management

2013-04-19 Thread Tejun Heo
Hey,

On Fri, Apr 19, 2013 at 06:10:57AM +0800, Lai Jiangshan wrote:
> Ping.

Sorry, I've been at collab summit / lsf.  Plus, it's a bit too late
for for-3.10 anyway.  Anyways, after glancing over it, here are my
preliminary thoughts.  The first one looks good but I'm not sure about
dropping nr_running adjustment.  The only real benefit coming from
that is dropping a sched callback and if there's any performance /
overhead impact, I'm afraid it's gonna be negative.  There are actual
benefits in using as few tasks as possible - the cache footprint gets
smaller, so unless there's a clear indication that the suggested
behavior is better in some way, I'm not sure what we're buying with
the proposed changes.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/8] workqueue: advance concurrency management

2013-04-19 Thread Tejun Heo
Hey,

On Fri, Apr 19, 2013 at 06:10:57AM +0800, Lai Jiangshan wrote:
 Ping.

Sorry, I've been at collab summit / lsf.  Plus, it's a bit too late
for for-3.10 anyway.  Anyways, after glancing over it, here are my
preliminary thoughts.  The first one looks good but I'm not sure about
dropping nr_running adjustment.  The only real benefit coming from
that is dropping a sched callback and if there's any performance /
overhead impact, I'm afraid it's gonna be negative.  There are actual
benefits in using as few tasks as possible - the cache footprint gets
smaller, so unless there's a clear indication that the suggested
behavior is better in some way, I'm not sure what we're buying with
the proposed changes.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/8] workqueue: advance concurrency management

2013-04-18 Thread Lai Jiangshan
Ping.

On Mon, Apr 15, 2013 at 12:41 AM, Lai Jiangshan  wrote:
> I found the early-increasing nr_running in wq_worker_waking_up() is useless
> in many cases. it tries to avoid waking up idle workers for pending work item.
> but delay increasing nr_running does not increase waking up idle workers.
>
> so we delay increasing and remove wq_worker_waking_up() and ...
>
> enjoy a simpler concurrency management.
>
> Lai Jiangshan (8):
>   workqueue: remove @cpu from wq_worker_sleeping()
>   workqueue: use create_and_start_worker() in manage_workers()
>   workqueue: remove cpu_intensive from process_one_work()
>   workqueue: quit cm mode when sleeping
>   workqueue: remove disabled wq_worker_waking_up()
>   workqueue: make nr_running non-atomic
>   workqueue: move worker->flags up
>   workqueue: rename ->nr_running to ->nr_cm_workers
>
>  kernel/sched/core.c |6 +-
>  kernel/workqueue.c  |  234 +++---
>  kernel/workqueue_internal.h |9 +-
>  3 files changed, 89 insertions(+), 160 deletions(-)
>
> --
> 1.7.7.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/8] workqueue: advance concurrency management

2013-04-18 Thread Lai Jiangshan
Ping.

On Mon, Apr 15, 2013 at 12:41 AM, Lai Jiangshan la...@cn.fujitsu.com wrote:
 I found the early-increasing nr_running in wq_worker_waking_up() is useless
 in many cases. it tries to avoid waking up idle workers for pending work item.
 but delay increasing nr_running does not increase waking up idle workers.

 so we delay increasing and remove wq_worker_waking_up() and ...

 enjoy a simpler concurrency management.

 Lai Jiangshan (8):
   workqueue: remove @cpu from wq_worker_sleeping()
   workqueue: use create_and_start_worker() in manage_workers()
   workqueue: remove cpu_intensive from process_one_work()
   workqueue: quit cm mode when sleeping
   workqueue: remove disabled wq_worker_waking_up()
   workqueue: make nr_running non-atomic
   workqueue: move worker-flags up
   workqueue: rename -nr_running to -nr_cm_workers

  kernel/sched/core.c |6 +-
  kernel/workqueue.c  |  234 +++---
  kernel/workqueue_internal.h |9 +-
  3 files changed, 89 insertions(+), 160 deletions(-)

 --
 1.7.7.6

 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/8] workqueue: advance concurrency management

2013-04-14 Thread Lai Jiangshan
I found the early-increasing nr_running in wq_worker_waking_up() is useless
in many cases. it tries to avoid waking up idle workers for pending work item.
but delay increasing nr_running does not increase waking up idle workers.

so we delay increasing and remove wq_worker_waking_up() and ...

enjoy a simpler concurrency management.

Lai Jiangshan (8):
  workqueue: remove @cpu from wq_worker_sleeping()
  workqueue: use create_and_start_worker() in manage_workers()
  workqueue: remove cpu_intensive from process_one_work()
  workqueue: quit cm mode when sleeping
  workqueue: remove disabled wq_worker_waking_up()
  workqueue: make nr_running non-atomic
  workqueue: move worker->flags up
  workqueue: rename ->nr_running to ->nr_cm_workers

 kernel/sched/core.c |6 +-
 kernel/workqueue.c  |  234 +++---
 kernel/workqueue_internal.h |9 +-
 3 files changed, 89 insertions(+), 160 deletions(-)

-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/8] workqueue: advance concurrency management

2013-04-14 Thread Lai Jiangshan
I found the early-increasing nr_running in wq_worker_waking_up() is useless
in many cases. it tries to avoid waking up idle workers for pending work item.
but delay increasing nr_running does not increase waking up idle workers.

so we delay increasing and remove wq_worker_waking_up() and ...

enjoy a simpler concurrency management.

Lai Jiangshan (8):
  workqueue: remove @cpu from wq_worker_sleeping()
  workqueue: use create_and_start_worker() in manage_workers()
  workqueue: remove cpu_intensive from process_one_work()
  workqueue: quit cm mode when sleeping
  workqueue: remove disabled wq_worker_waking_up()
  workqueue: make nr_running non-atomic
  workqueue: move worker-flags up
  workqueue: rename -nr_running to -nr_cm_workers

 kernel/sched/core.c |6 +-
 kernel/workqueue.c  |  234 +++---
 kernel/workqueue_internal.h |9 +-
 3 files changed, 89 insertions(+), 160 deletions(-)

-- 
1.7.7.6

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/