Re: [PATCH] Add module_kernel_thread for threads that live in modules.

Rusty Russell (rusty@rustcorp.com.au)
Mon, 16 Jun 2003 19:22:43 +1000


In message <Pine.LNX.4.44.0306161043020.2079-100000@notebook.home.mdiehl.de> you write:
> On Mon, 16 Jun 2003, Rusty Russell wrote:
> > It would be syncronous:
>
> You mean your cleanup_thread would block for completion of the keventd
> stuff? Ok, this would work. But then, when calling cleanup_thread, f.e. we
> must not hold any semaphore which might be acquired by _any_ other work
> scheduled for keventd or we might end in deadlock (like the rtnl+hotplug
> issue we had seen recently).

I think we're talking across each other: take a look at the existing
kernel/kmod.c __call_usermodehelper to see how we wait at the moment.

> > Also, this replaces complete_and_exit: the thread can just exit. This
> > simplifies things for the users, too...
>
> Personally I do like the complete_and_exit thing as a simple and clear
> finalisation point.

Not as clean as "wait until the thread has exited", surely!

Cheers,
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/