mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] workqueue: Separate out drain_workqueue() from destroy_workqueue()
Date: Tue, 05 Apr 2011 07:47:01 -0700	[thread overview]
Message-ID: <1302014822.2924.0.camel@mulgrave.site> (raw)
In-Reply-To: <20110405143522.GA9621@mtj.dyndns.org>

On Tue, 2011-04-05 at 07:35 -0700, Tejun Heo wrote:
> There are users which want to drain workqueues without destroying it.
> Separate out drain functionality from destroy_workqueue() into
> drain_workqueue() and make it accessible to workqueue users.
> 
> To guarantee forward-progress, only chain queueing is allowed while
> drain is in progress.  If a new work item which isn't chained from the
> running or pending work items is queued while draining is in progress,
> WARN_ON_ONCE() is triggered.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
> ---
> James, does this seem to fit your use cases?

Perfectly, thanks.  It makes sure we have eliminated all work the
workqueues generated before we return.  This is needed in some of the
SCSI waits where we want all discovery to complete, not just the piece
the WQ started.

Thanks,

James



  reply	other threads:[~2011-04-05 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 14:35 Tejun Heo
2011-04-05 14:47 ` James Bottomley [this message]
2011-04-05 16:07   ` 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=1302014822.2924.0.camel@mulgrave.site \
    --to=james.bottomley@hansenpartnership.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

all inboxes | Powered by JetHome®