Re: calling flush_scheduled_work()

From: Tim Hockin
Date: Fri Mar 12 2004 - 17:41:38 EST

On Fri, Mar 12, 2004 at 05:00:48PM -0500, Trond Myklebust wrote:
> It would be dead easy to change RPC+NFS to use their own, workqueue. In
> fact I've already considered that several times in the places where the
> NFSv4 state stuff gets hairy. ... but it might be nice not to have to
> set up all these (mostly) idle threads for exclusive use by NFS just in
> order to catch a corner case.
> Could we therefore perhaps consider setting up one or more global
> workqueues that would be alternatives to keventd?

That just divides up the problem, but doesn't solve it. The simplest would
be to print a badness and somehow get out of the flush. Then anyone who is
triggering the corner case (us, in this case) can just solve it ourselves.
It's not pretty.

In short, it's dubious that ANYONE call flush_scheduled_work() on a
workqueue that they don't own.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at