[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1302014822.2924.0.camel@mulgrave.site>
Date: Tue, 05 Apr 2011 07:47:01 -0700
From: James Bottomley <James.Bottomley@...senPartnership.com>
To: Tejun Heo <tj@...nel.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] workqueue: Separate out drain_workqueue() from
destroy_workqueue()
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@...nel.org>
> Cc: James Bottomley <James.Bottomley@...senpartnership.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists