This is an attempt to reduce the stack footprint of various functions
(those using any of the wait_event_* macros), by removing the need to
allocate a wait_queue_t on the stack and instead use a single instance
embedded in task_struct. I'm not really sure where the best place to
put it is; I just placed it next to other list bookkeeping fields.

For now, there is a little unconditional debugging. This could later
be removed or maybe be made dependent on some CONFIG_* variable. The
idea of using ->flags is taken from Pavel [1] (I originally stored
(void*)1 into ->private).

Compiles, but not actually tested.

[1] http://thread.gmane.org/gmane.linux.kernel/1720670

Rasmus Villemoes (2):
  wait: Introduce per-task wait_queue_t
  wait: Use the per-task wait_queue_t in ___wait_event macro

 include/linux/sched.h | 23 +++++++++++++++++++++++
 include/linux/wait.h  | 18 ++++++++++--------
 kernel/fork.c         |  1 +
 3 files changed, 34 insertions(+), 8 deletions(-)

-- 
1.9.2

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

Reply via email to