Re: [PATCH 0/2] Per-task wait_queue_t

From: Peter Zijlstra
Date: Tue Jun 10 2014 - 11:50:48 EST


On Tue, Jun 10, 2014 at 02:29:17PM +0200, Rasmus Villemoes wrote:
> 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.
>

Doesn't look too bad, would be good to be tested and have some numbers
on the amount of stack saved etc..

Attachment: pgp6qW7zWRVvi.pgp
Description: PGP signature