|| ||Tejun Heo <firstname.lastname@example.org> |
|| ||email@example.com, firstname.lastname@example.org, email@example.com,
firstname.lastname@example.org, email@example.com, firstname.lastname@example.org,
email@example.com, firstname.lastname@example.org, email@example.com,
firstname.lastname@example.org, email@example.com, firstname.lastname@example.org |
|| ||[PATCHSET] workqueue: concurrency managed workqueue, take#4 |
|| ||Fri, 26 Feb 2010 21:22:37 +0900|
|| ||Article, Thread
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
Quilt series is available at
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].
* Oleg's 0008-workqueue-change-cancel_work_sync-to-clear-work-data
added. It clears work->data after cancel_work_sync(). cmwq patches
* 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
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
- debug information remains equivalent.
* Other misc tweaks.
This patchset contains the following patches.
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(-)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/