[RFC PATCH 00/18] kthreads/signal: Safer kthread API and signal handling

Tejun Heo tj at kernel.org
Tue Jun 9 00:58:08 PDT 2015


Hello, Petr.

I've skimmed through the patchset and I'm not quite sure.
kthread_iterant seems to map almost one to one to kthread_worker
interface.  One calls a predefined callback repeatedly while the other
queues work items which contain callback.  One does nasty plumbing
tasks inbetween interations, the other does inbetween work items.  One
has sleep helper to sleep "safely", the other can use delayed work
items and flushing cancel.  In fact, I'm pretty sure it'd be trivial
to convert between the two sets of API.

If so, is it really worthwhile to introduce the new API?
kthread_iterant is closer to raw kthread but not quite.  It shouldn't
be difficult to apply the bulk of kthread_iterant's features to
kthread_worker.  Wouldn't it be more beneficial to have async
execution mechanisms more closely aligned?

Thanks a lot.

-- 
tejun



More information about the linux-mtd mailing list