Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core)

From: Peter Zijlstra
Date: Thu Jun 23 2016 - 14:54:59 EST


On Thu, Jun 23, 2016 at 11:00:08AM -0700, Kees Cook wrote:
>
> Why does __mutex_lock_common() have "task" as a stack variable?

That's actually a fairly common thing to do. The reason is that
'current' is far more expensive to evaluate than a local variable.