Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1431281

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

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core)
Date 2016-06-26 03:30 +0200
Message-ID <rO73A-4EC-1@gated-at.bofh.it> (permalink)
References (13 earlier) <rNGZr-574-7@gated-at.bofh.it> <rNGZr-574-9@gated-at.bofh.it> <rNLPr-8d9-3@gated-at.bofh.it> <rO5br-3yu-5@gated-at.bofh.it> <rO5l7-3BL-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-23 19:50 +0200
  Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-23 20:00 +0200
    Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Kees Cook <keescook@chromium.org> - 2016-06-23 20:10 +0200
      Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86,  core) Peter Zijlstra <peterz@infradead.org> - 2016-06-23 21:00 +0200
    Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86,  core) Oleg Nesterov <oleg@redhat.com> - 2016-06-23 20:20 +0200
      Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86,  core) Peter Zijlstra <peterz@infradead.org> - 2016-06-23 21:00 +0200
    Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-23 20:50 +0200
      Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Andy Lutomirski <luto@amacapital.net> - 2016-06-23 21:10 +0200
    Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86,  core) Peter Zijlstra <peterz@infradead.org> - 2016-06-23 21:00 +0200
      Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-23 21:20 +0200
        Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-24 08:20 +0200
          Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Brian Gerst <brgerst@gmail.com> - 2016-06-24 14:30 +0200
            Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-24 19:30 +0200
              Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-24 19:50 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Andy Lutomirski <luto@amacapital.net> - 2016-06-24 19:50 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-24 20:00 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Andy Lutomirski <luto@amacapital.net> - 2016-06-24 20:40 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-24 20:00 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-24 20:20 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Andy Lutomirski <luto@amacapital.net> - 2016-06-24 23:00 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86,  core) Josh Poimboeuf <jpoimboe@redhat.com> - 2016-06-24 23:00 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-24 23:10 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Andy Lutomirski <luto@amacapital.net> - 2016-06-24 23:30 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-24 23:40 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Andy Lutomirski <luto@amacapital.net> - 2016-06-24 23:40 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-25 04:50 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Andy Lutomirski <luto@amacapital.net> - 2016-06-26 01:30 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Andy Lutomirski <luto@amacapital.net> - 2016-06-26 01:40 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-26 03:30 +0200
                Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86,  core) Josh Poimboeuf <jpoimboe@redhat.com> - 2016-06-24 23:10 +0200
      Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Andy Lutomirski <luto@amacapital.net> - 2016-06-23 21:20 +0200
        Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86,  core) Peter Zijlstra <peterz@infradead.org> - 2016-06-23 21:20 +0200
  Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86,  core) Oleg Nesterov <oleg@redhat.com> - 2016-06-23 21:00 +0200
    Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86,  core) Michal Hocko <mhocko@kernel.org> - 2016-06-24 16:20 +0200
      Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86,  core) Michal Hocko <mhocko@kernel.org> - 2016-06-24 17:10 +0200
        Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages  (x86, core) Oleg Nesterov <oleg@redhat.com> - 2016-06-24 22:30 +0200
          Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86,  core) Michal Hocko <mhocko@kernel.org> - 2016-06-27 12:40 +0200

csiph-web