lkml.org 
[lkml]   [2000]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] export wake_up_process on 2.2.17

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/

\
 
 \ /
  Last update: 2005-03-22 12:37    [W:0.051 / U:0.120 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site