Re: [PATCH 08/12] x86/dumpstack: Pin the target stack in save_stack_trace_tsk()

From: Peter Zijlstra
Date: Fri Sep 16 2016 - 12:35:49 EST


On Fri, Sep 16, 2016 at 08:32:44AM -0700, Andy Lutomirski wrote:
>
> I'm not sure I care quite enough about /proc/PID/stack to personally
> dig through the scheduler and find a way to cleanly say "please don't
> run this task for a little while".

The 'best' we can do is prod the task awake and then have it take itself
out, which is what SIGSTOP and ptrace() do. It is also rather ugly, due
to avoiding overhead on regular hot paths.