Re: [PATCH] export wake_up_process on 2.2.17

From: Ingo Molnar (mingo@elte.hu)
Date: Wed Aug 23 2000 - 11:12:02 EST


On Wed, 23 Aug 2000, Michael Rothwell wrote:

> > why is this needed? No include file ever calls wake_up_process directly,
> > it's an internal scheduler function, not be used from a module directly.
>
> It's exported in 2.4. It's useful for waking up kernel threads.

we should unexport it. Wakeups should be done via waitqueues - that way we
can do wakeup optimizations (eg. avoid taking the runqueue and waitqueue
lock if the waitqueue is empty) on the waitqueue level which are not done
at the wake_up_process level. It should be renamed to __wake_up_process()
rather. I understand the one-kernel-thread special case, but these
optimizations apply even in that case, and by using waitqueues the
multiple-kernel-threads case can be implemented much more easily.

plus, using wake_up_process on a thread pointer is not SMP-safe wrt.
module-removals - so only the 'in-kernel' kernel threads like bdflush
(which never exit) should use it.

        Ingo

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



This archive was generated by hypermail 2b29 : Wed Aug 23 2000 - 21:00:08 EST