lkml.org 
[lkml]   [2016]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core)
On Sat, Jun 25, 2016 at 4:30 PM, Andy Lutomirski <luto@amacapital.net> wrote:
>
> Maybe I'm misunderstanding the role of release_task. It looks like
> there's this path in the scheduler I can borrow:
>
> if (unlikely(prev_state == TASK_DEAD)) {
>
> With a kludge in place to free the stack in there and release_task and
> __put_task_struct, whichever is first, I get a nice speedup.
> Benchmarks coming later on. Can I rely on that code path always being
> called?

Absolutely. That's the normal "task is done, put the thread struct".
IOW, that's the final "put_task_struct()" that the task "itself" calls
as it exits - there may be other things that hold a reference to the
task struct, but that's where you should free the stack because the
thread itself is done with it..

Linus

\
 
 \ /
  Last update: 2016-06-26 04:01    [W:1.001 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site