Re: + kmod-avoid-deadlock-by-recursive-kmod-call.patch added to-mm tree

From: Oleg Nesterov
Date: Mon Jan 30 2012 - 08:09:58 EST


On 01/29, Tejun Heo wrote:
>
> BTW, why does it have to be unbound_wq?

Perhaps we can use another system_wq, but afaics WQ_UNBOUND makes sense
in this case. I mean, there is no reason to bind this work to any CPU.
See also below.

> Is it expected consume large
> amount of CPU cycles?

Currently __call_usermodehelper() does kernel_thread(), this is almost
all. But it can block waiting for kernel_execve().

Not sure this really makes sense, but if we kill khelper_wq perhaps we
can simplify this code a bit. We can change __call_usermodehelper()

if (wait == UMH_WAIT_PROC)
- pid = kernel_thread(wait_for_helper, sub_info,
- CLONE_FS | CLONE_FILES | SIGCHLD);
+ wait_for_helper(...);
else

IOW, the worker thread itself can do the UMH_WAIT_PROC work. This makes
this work really "long running", but then we can kill sub_info->complete
and use flush_work().

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/