All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: linux-kernel@vger.kernel.org, oleg@redhat.com
Cc: dmitry.torokhov@gmail.com
Subject: [PATCHSET] workqueue: implement alloc_ordered_workqueue() and flush[_delayed]_work_sync()
Date: Thu, 16 Sep 2010 13:24:03 +0200	[thread overview]
Message-ID: <1284636247-4734-1-git-send-email-tj@kernel.org> (raw)

Hello,

This patchset implements new workqueue API fucntions -
alloc_ordered_workqueue() and flush[_delayed]_work_sync().

The former is rather straight-forward replacement for
alloc_singlethread/frozen_workqueue().

The latter two are similar to cancel[_delayed]_work_sync() but wait
for the work to finish execution rather than cancelling them.  These
syncing flushes make sure that works which were queued on multiple
workqueues or a reentrant workqueues have finished execution on all
CPUs.  One usage of these new flushes is replacing
flush_scheduled_works() with finer scoped flushes.

This patchset contains the following four patches.

 0001-workqueue-implement-alloc_ordered_workqueue.patch
 0002-workqueue-cleanup-flush-cancel-functions.patch
 0003-workqueue-factor-out-start_flush_work.patch
 0004-workqueue-implement-flush-_delayed-_work_sync.patch

0001 adds alloc_ordered_workqueue().  0002-0003 prepare for syncing
flushes.  0004 implements them.

Dmitry, as I wrote before, I think serio should be able to simply use
schedule_work() combined with flush_work_sync() implemented by this
patchset.  Would this work for you?

The patches are available in the following git tree.

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

and contains the following changes.

 include/linux/workqueue.h |   38 +++++-
 kernel/workqueue.c        |  265 +++++++++++++++++++++++++++++-----------------
 2 files changed, 201 insertions(+), 102 deletions(-)

Thanks.

--
tejun

             reply	other threads:[~2010-09-16 11:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16 11:24 Tejun Heo [this message]
2010-09-16 11:24 ` [PATCH 1/4] workqueue: implement alloc_ordered_workqueue() Tejun Heo
2010-09-16 11:24 ` [PATCH 2/4] workqueue: cleanup flush/cancel functions Tejun Heo
2010-09-16 11:24 ` [PATCH 3/4] workqueue: factor out start_flush_work() Tejun Heo
2010-09-16 11:24 ` [PATCH 4/4] workqueue: implement flush[_delayed]_work_sync() 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=1284636247-4734-1-git-send-email-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.