Thread (33 messages) 33 messages, 3 authors, 2016-06-29

Re: [PATCH v9 06/12] kthread: Add kthread_drain_worker()

From: Petr Mladek <pmladek@suse.com>
Date: 2016-06-29 08:18:12
Also in: linux-mm, lkml

On Tue 2016-06-28 13:04:47, Tejun Heo wrote:
Hello,

On Mon, Jun 27, 2016 at 04:33:50PM +0200, Petr Mladek wrote:
quoted
OK, so you suggest to do the following:

  1. Add a flag into struct kthread_worker that will prevent
     from further queuing.
This doesn't add any protection, right?  It's getting freed anyway.
quoted
  2. kthread_create_worker()/kthread_destroy_worker() will
     not longer dynamically allocate struct kthread_worker.
     They will just start/stop the kthread.
Ah, okay, I don't think we need to change this.  I was suggesting to
simplify it by dropping the draining and just do flush from destroy.
I see. But then it does not address the original concern from Peter
Zijlstra. He did not like that the caller was responsible for blocking
further queueing. It still will be needed. Or did I miss something,
please?

Best Regards,
Petr

--
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help