Re: [RFC v2 04/18] kthread: Add destroy_kthread_worker()

From
Tejun Heo <tj@kernel.org>
Date
2015-09-22 18:30:17
Also in
linux-mm, lkml
Reply to
Petr Mladek, 2015-09-21
Hello,

On Mon, Sep 21, 2015 at 03:03:45PM +0200, Petr Mladek wrote:
...
Note that flush() does not guarantee that the queue is empty. drain()
is more safe. It returns when the queue is really empty. Also it warns
Maybe it'd be better to be a bit more specific.  drain() is safer
because it can handle self-requeueing work items.
when too many work is being queued when draining.
...
quoted hunk ↗ jump to hunk
+/**
+ * destroy_kthread_worker - destroy a kthread worker
+ * @worker: worker to be destroyed
+ *
+ * Destroy @worker. It should be idle when this is called.
So, no new work item should be queued from this point on but @worker
is allowed to be not idle.

Thanks.

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Thread (44 messages) 44 messages, 3 authors, last reply 2015-10-14
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help