public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET] workqueue: concurrency managed workqueue, take#4
@ 2010-02-26 12:22 Tejun Heo
  2010-02-26 12:22 ` [PATCH 01/43] sched: consult online mask instead of active in select_fallback_rq() Tejun Heo
                   ` (47 more replies)
  0 siblings, 48 replies; 86+ messages in thread
From: Tejun Heo @ 2010-02-26 12:22 UTC (permalink / raw)
  To: torvalds, mingo, peterz, awalls, linux-kernel, jeff, akpm,
	jens.axboe, rusty, cl, dhowells, arjan, avi, johannes, andi, oleg

Hello, all.

This is the fourth take of cmwq (concurrency managed workqueue)
patchset.  It's on top of 60b341b778cc2929df16c0a504c91621b3c6a4ad
(v2.6.33).  Git tree is available at

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git review-cmwq

Quilt series is available at

  http://master.kernel.org/~tj/patches/review-cmwq.tar.gz

I tested the fscache changes with nfs + cachefiles and it works well
for me but the workload wasn't enough to put the yielding logic to the
test so it needs to be verified.

Please note that the scheduler patches need description update.  I'll
do that when establishing scheduler merge tree.

Depending on how you look at the result, the perf test from the last
take[L] showed no performance regression or insignificant improvement.
I'm quite happy with libata conversion.  Async works well with the
backend replaced with cmwq.  Fscache conversion is still in progress
but fscache workers are mostly used to issue and wait for IOs and I
think conversion so far shows that with some more impedence matching,
there shouldn't be major issues.

Now with non-reentrant and debugfs support, the whole series add about
800 lines but a lot are for cold-path things like CPU hotplug,
freezing and debugging.  Given that further conversions are likely to
simplify other workqueue users and the added capability, I don't think
800 more lines at this point is much.

Unless there still are major objections, I'd really like to go forward
with setting up a stable devel tree.  Ingo, do you still have
reservations about setting up a scheduler devel branch for cmwq?

The following patches have been added/updated since the last take[L].

 0008-workqueue-change-cancel_work_sync-to-clear-work-data.patch
 0013-workqueue-define-masks-for-work-flags-and-conditiona.patch
 0028-workqueue-carry-cpu-number-in-work-data-once-executi.patch
 0029-workqueue-implement-WQ_NON_REENTRANT.patch
 0033-workqueue-add-system_wq-system_long_wq-and-system_nr.patch
 0034-workqueue-implement-DEBUGFS-workqueue.patch
 0035-workqueue-implement-several-utility-APIs.patch
 0038-fscache-convert-object-to-use-workqueue-instead-of-s.patch
 0039-fscache-convert-operation-to-use-workqueue-instead-o.patch

* Oleg's 0008-workqueue-change-cancel_work_sync-to-clear-work-data
  added.  It clears work->data after cancel_work_sync().  cmwq patches
  updated accordingly.

* 0013 updated such that WORK_STRUCT_STATIC bit is used iff
  CONFIG_DEBUG_OBJECTS_WORK is enabled.  This reduces cwq alignment to
  64bytes with debug objects disabled.

* 0028-0029 added to implement non-reentrant workqueue.  A workqueue
  can be made non-reentrant by specifying WQ_NON_REENTRANT on
  creation.

  When a work starts executing, the data part of work->data is set to
  the CPU number so that NRT workqueue can reliably determine where
  the work was last on on the next queue.  Once the last CPU is known,
  the queueing code looks up the busy worker hash and determines
  whether the work is still running there in which case the work is
  queued on that cpu.  As workqueue guarantees non-reentrance on
  single CPU, this extra affining makes it globally non-reentrant.

  Delayed queueing path is updated to preserve the CPU number recorded
  in wq->data and flush and cancel code paths are updated to first
  look up the gcwq for a work rather than cwq which no longer is
  available once a work starts executing.

* In 0033, system_single_workqueue replaced with system_nrt_workqueue.

* 0034 adds debugfs support.  If CONFIG_WORKQUEUE_DEBUGFS is enabled,
  <debugfs>/workqueue lists all workers and works.  The output is
  pretty similar to that of slow-work debugfs and also has per-wq
  custom show method mechanism copied from slow-work.

* 0035 is what used to be 0030-workqueue-implement-work_busy.
  work_busy() is extended to check both pending and running states and
  other utility functions are added too - workqueue_set_max_active(),
  workqueue_congested() and work_cpu().

* fscache conversion patches 0038-0039 updated so that
  - non-reentrant workqueues are used instead of single workqueues.
  - sysctl knobs added to control max_active.
  - object worker yielding mechanism is implemented in fscache proper
    using workqueue_congested().
  - debug information remains equivalent.

* Other misc tweaks.

This patchset contains the following patches.

 0001-sched-consult-online-mask-instead-of-active-in-selec.patch
 0002-sched-rename-preempt_notifiers-to-sched_notifiers-an.patch
 0003-sched-refactor-try_to_wake_up.patch
 0004-sched-implement-__set_cpus_allowed.patch
 0005-sched-make-sched_notifiers-unconditional.patch
 0006-sched-add-wakeup-sleep-sched_notifiers-and-allow-NUL.patch
 0007-sched-implement-try_to_wake_up_local.patch
 0008-workqueue-change-cancel_work_sync-to-clear-work-data.patch
 0009-acpi-use-queue_work_on-instead-of-binding-workqueue-.patch
 0010-stop_machine-reimplement-without-using-workqueue.patch
 0011-workqueue-misc-cosmetic-updates.patch
 0012-workqueue-merge-feature-parameters-into-flags.patch
 0013-workqueue-define-masks-for-work-flags-and-conditiona.patch
 0014-workqueue-separate-out-process_one_work.patch
 0015-workqueue-temporarily-disable-workqueue-tracing.patch
 0016-workqueue-kill-cpu_populated_map.patch
 0017-workqueue-update-cwq-alignement.patch
 0018-workqueue-reimplement-workqueue-flushing-using-color.patch
 0019-workqueue-introduce-worker.patch
 0020-workqueue-reimplement-work-flushing-using-linked-wor.patch
 0021-workqueue-implement-per-cwq-active-work-limit.patch
 0022-workqueue-reimplement-workqueue-freeze-using-max_act.patch
 0023-workqueue-introduce-global-cwq-and-unify-cwq-locks.patch
 0024-workqueue-implement-worker-states.patch
 0025-workqueue-reimplement-CPU-hotplugging-support-using-.patch
 0026-workqueue-make-single-thread-workqueue-shared-worker.patch
 0027-workqueue-add-find_worker_executing_work-and-track-c.patch
 0028-workqueue-carry-cpu-number-in-work-data-once-executi.patch
 0029-workqueue-implement-WQ_NON_REENTRANT.patch
 0030-workqueue-use-shared-worklist-and-pool-all-workers-p.patch
 0031-workqueue-implement-concurrency-managed-dynamic-work.patch
 0032-workqueue-increase-max_active-of-keventd-and-kill-cu.patch
 0033-workqueue-add-system_wq-system_long_wq-and-system_nr.patch
 0034-workqueue-implement-DEBUGFS-workqueue.patch
 0035-workqueue-implement-several-utility-APIs.patch
 0036-libata-take-advantage-of-cmwq-and-remove-concurrency.patch
 0037-async-use-workqueue-for-worker-pool.patch
 0038-fscache-convert-object-to-use-workqueue-instead-of-s.patch
 0039-fscache-convert-operation-to-use-workqueue-instead-o.patch
 0040-fscache-drop-references-to-slow-work.patch
 0041-cifs-use-workqueue-instead-of-slow-work.patch
 0042-gfs2-use-workqueue-instead-of-slow-work.patch
 0043-slow-work-kill-it.patch

diffstat follows.

 Documentation/filesystems/caching/fscache.txt |   10 
 Documentation/slow-work.txt                   |  322 --
 arch/ia64/kernel/smpboot.c                    |    2 
 arch/ia64/kvm/Kconfig                         |    1 
 arch/powerpc/kvm/Kconfig                      |    1 
 arch/s390/kvm/Kconfig                         |    1 
 arch/x86/kernel/smpboot.c                     |    2 
 arch/x86/kvm/Kconfig                          |    1 
 drivers/acpi/osl.c                            |   41 
 drivers/ata/libata-core.c                     |   19 
 drivers/ata/libata-eh.c                       |    4 
 drivers/ata/libata-scsi.c                     |   10 
 drivers/ata/libata.h                          |    1 
 fs/cachefiles/namei.c                         |   14 
 fs/cachefiles/rdwr.c                          |    4 
 fs/cifs/Kconfig                               |    1 
 fs/cifs/cifsfs.c                              |    6 
 fs/cifs/cifsglob.h                            |    8 
 fs/cifs/dir.c                                 |    2 
 fs/cifs/file.c                                |   30 
 fs/cifs/misc.c                                |   20 
 fs/fscache/Kconfig                            |    1 
 fs/fscache/internal.h                         |    8 
 fs/fscache/main.c                             |  141 +
 fs/fscache/object-list.c                      |   11 
 fs/fscache/object.c                           |  106 
 fs/fscache/operation.c                        |   67 
 fs/fscache/page.c                             |   36 
 fs/gfs2/Kconfig                               |    1 
 fs/gfs2/incore.h                              |    3 
 fs/gfs2/main.c                                |   14 
 fs/gfs2/ops_fstype.c                          |    8 
 fs/gfs2/recovery.c                            |   54 
 fs/gfs2/recovery.h                            |    6 
 fs/gfs2/sys.c                                 |    3 
 include/linux/fscache-cache.h                 |   46 
 include/linux/kvm_host.h                      |    4 
 include/linux/libata.h                        |    2 
 include/linux/preempt.h                       |   48 
 include/linux/sched.h                         |   71 
 include/linux/slow-work.h                     |  163 -
 include/linux/stop_machine.h                  |    6 
 include/linux/workqueue.h                     |  145 -
 init/Kconfig                                  |   28 
 init/main.c                                   |    2 
 kernel/Makefile                               |    2 
 kernel/async.c                                |  140 -
 kernel/power/process.c                        |   21 
 kernel/sched.c                                |  334 +-
 kernel/slow-work-debugfs.c                    |  227 -
 kernel/slow-work.c                            | 1068 --------
 kernel/slow-work.h                            |   72 
 kernel/stop_machine.c                         |  151 -
 kernel/sysctl.c                               |    8 
 kernel/trace/Kconfig                          |    4 
 kernel/workqueue.c                            | 3283 ++++++++++++++++++++++----
 lib/Kconfig.debug                             |    7 
 virt/kvm/kvm_main.c                           |   26 
 58 files changed, 3807 insertions(+), 3010 deletions(-)

Thanks.

--
tejun

[L] http://thread.gmane.org/gmane.linux.kernel/939353

^ permalink raw reply	[flat|nested] 86+ messages in thread

end of thread, other threads:[~2010-04-25  8:11 UTC | newest]

Thread overview: 86+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-26 12:22 [PATCHSET] workqueue: concurrency managed workqueue, take#4 Tejun Heo
2010-02-26 12:22 ` [PATCH 01/43] sched: consult online mask instead of active in select_fallback_rq() Tejun Heo
2010-02-26 12:22 ` [PATCH 02/43] sched: rename preempt_notifiers to sched_notifiers and refactor implementation Tejun Heo
2010-02-26 12:22 ` [PATCH 03/43] sched: refactor try_to_wake_up() Tejun Heo
2010-02-26 12:22 ` [PATCH 04/43] sched: implement __set_cpus_allowed() Tejun Heo
2010-02-26 12:22 ` [PATCH 05/43] sched: make sched_notifiers unconditional Tejun Heo
2010-02-26 12:22 ` [PATCH 06/43] sched: add wakeup/sleep sched_notifiers and allow NULL notifier ops Tejun Heo
2010-02-26 12:22 ` [PATCH 07/43] sched: implement try_to_wake_up_local() Tejun Heo
2010-02-28 12:33   ` Oleg Nesterov
2010-03-01 14:22     ` Tejun Heo
2010-02-26 12:22 ` [PATCH 08/43] workqueue: change cancel_work_sync() to clear work->data Tejun Heo
2010-02-26 12:22 ` [PATCH 09/43] acpi: use queue_work_on() instead of binding workqueue worker to cpu0 Tejun Heo
2010-02-26 12:22 ` [PATCH 10/43] stop_machine: reimplement without using workqueue Tejun Heo
2010-02-28 14:11   ` Oleg Nesterov
2010-03-01 15:07     ` Tejun Heo
2010-03-01 15:37       ` Oleg Nesterov
2010-03-01 16:36         ` Tejun Heo
2010-03-01 16:50           ` Oleg Nesterov
2010-03-01 18:02             ` Tejun Heo
2010-02-28 14:34   ` Oleg Nesterov
2010-03-01 15:11     ` Tejun Heo
2010-03-01 15:41       ` Oleg Nesterov
2010-02-26 12:22 ` [PATCH 11/43] workqueue: misc/cosmetic updates Tejun Heo
2010-02-26 12:22 ` [PATCH 12/43] workqueue: merge feature parameters into flags Tejun Heo
2010-02-26 12:22 ` [PATCH 13/43] workqueue: define masks for work flags and conditionalize STATIC flags Tejun Heo
2010-02-26 12:22 ` [PATCH 14/43] workqueue: separate out process_one_work() Tejun Heo
2010-02-26 12:22 ` [PATCH 15/43] workqueue: temporarily disable workqueue tracing Tejun Heo
2010-02-26 12:22 ` [PATCH 16/43] workqueue: kill cpu_populated_map Tejun Heo
2010-02-28 16:00   ` Oleg Nesterov
2010-03-01 15:32     ` Tejun Heo
2010-03-01 15:50       ` Oleg Nesterov
2010-03-01 16:19         ` Tejun Heo
2010-02-26 12:22 ` [PATCH 17/43] workqueue: update cwq alignement Tejun Heo
2010-02-28 17:12   ` Oleg Nesterov
2010-03-01 16:40     ` Tejun Heo
2010-02-26 12:22 ` [PATCH 18/43] workqueue: reimplement workqueue flushing using color coded works Tejun Heo
2010-02-28 20:31   ` Oleg Nesterov
2010-03-01 17:33     ` Tejun Heo
2010-03-01 19:47       ` Oleg Nesterov
2010-02-26 12:22 ` [PATCH 19/43] workqueue: introduce worker Tejun Heo
2010-02-26 12:22 ` [PATCH 20/43] workqueue: reimplement work flushing using linked works Tejun Heo
2010-03-01 14:53   ` Oleg Nesterov
2010-03-01 18:00     ` Tejun Heo
2010-03-01 18:51       ` Oleg Nesterov
2010-02-26 12:22 ` [PATCH 21/43] workqueue: implement per-cwq active work limit Tejun Heo
2010-02-26 12:22 ` [PATCH 22/43] workqueue: reimplement workqueue freeze using max_active Tejun Heo
2010-02-26 12:23 ` [PATCH 23/43] workqueue: introduce global cwq and unify cwq locks Tejun Heo
2010-02-26 12:23 ` [PATCH 24/43] workqueue: implement worker states Tejun Heo
2010-02-26 12:23 ` [PATCH 25/43] workqueue: reimplement CPU hotplugging support using trustee Tejun Heo
2010-02-26 12:23 ` [PATCH 26/43] workqueue: make single thread workqueue shared worker pool friendly Tejun Heo
2010-02-26 12:23 ` [PATCH 27/43] workqueue: add find_worker_executing_work() and track current_cwq Tejun Heo
2010-02-26 12:23 ` [PATCH 28/43] workqueue: carry cpu number in work data once execution starts Tejun Heo
2010-02-28  7:08   ` [PATCH UPDATED " Tejun Heo
2010-02-26 12:23 ` [PATCH 29/43] workqueue: implement WQ_NON_REENTRANT Tejun Heo
2010-02-26 12:23 ` [PATCH 30/43] workqueue: use shared worklist and pool all workers per cpu Tejun Heo
2010-02-26 12:23 ` [PATCH 31/43] workqueue: implement concurrency managed dynamic worker pool Tejun Heo
2010-02-26 12:23 ` [PATCH 32/43] workqueue: increase max_active of keventd and kill current_is_keventd() Tejun Heo
2010-02-26 12:23 ` [PATCH 33/43] workqueue: add system_wq, system_long_wq and system_nrt_wq Tejun Heo
2010-02-26 12:23 ` [PATCH 34/43] workqueue: implement DEBUGFS/workqueue Tejun Heo
2010-02-28  7:13   ` [PATCH UPDATED " Tejun Heo
2010-02-26 12:23 ` [PATCH 35/43] workqueue: implement several utility APIs Tejun Heo
2010-02-28  7:15   ` [PATCH UPDATED " Tejun Heo
2010-02-26 12:23 ` [PATCH 36/43] libata: take advantage of cmwq and remove concurrency limitations Tejun Heo
2010-02-26 12:23 ` [PATCH 37/43] async: use workqueue for worker pool Tejun Heo
2010-02-26 12:23 ` [PATCH 38/43] fscache: convert object to use workqueue instead of slow-work Tejun Heo
2010-02-26 12:23 ` [PATCH 39/43] fscache: convert operation " Tejun Heo
2010-02-26 12:23 ` [PATCH 40/43] fscache: drop references to slow-work Tejun Heo
2010-02-26 12:23 ` [PATCH 41/43] cifs: use workqueue instead of slow-work Tejun Heo
2010-02-28  7:09   ` [PATCH UPDATED " Tejun Heo
2010-02-26 12:23 ` [PATCH 42/43] gfs2: " Tejun Heo
2010-02-28  7:10   ` [PATCH UPDATED " Tejun Heo
2010-02-26 12:23 ` [PATCH 43/43] slow-work: kill it Tejun Heo
2010-02-27 22:52 ` [PATCH] workqueue: Fix build on PowerPC Anton Blanchard
2010-02-28  6:08   ` Tejun Heo
2010-02-28  1:00 ` [PATCH] workqueue: Fix a compile warning in work_busy Anton Blanchard
2010-02-28  6:18   ` Tejun Heo
2010-02-28  1:11 ` [PATCHSET] workqueue: concurrency managed workqueue, take#4 Anton Blanchard
2010-02-28  6:32   ` Tejun Heo
2010-03-10 14:52 ` David Howells
2010-03-12  5:03   ` Tejun Heo
2010-03-12 11:23     ` David Howells
2010-03-12 22:55       ` Tejun Heo
2010-03-16 14:38         ` David Howells
2010-03-16 16:03           ` Tejun Heo
2010-03-16 17:18             ` David Howells
2010-04-25  8:09 ` [PATCHSET UPDATED] " Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox