[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170929155733.y4csusut3bmucght@treble>
Date: Fri, 29 Sep 2017 10:57:33 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Miroslav Benes <mbenes@...e.cz>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] x86, stacktrace: avoid recording save_stack_trace
wrappers
On Fri, Sep 29, 2017 at 11:23:35AM +0200, Vlastimil Babka wrote:
> The save_stack_trace() and save_stack_trace_tsk() wrappers of
> __save_stack_trace() add themselves to the call stack, and thus appear in the
> recorded stacktraces. This is redundant and wasteful when we have limited space
> to record the useful part of the backtrace with e.g. page_owner functionality.
>
> Fix this by making sure __save_stack_trace() is noinline (which matches the
> current gcc decision) and bumping the skip in the wrappers
> (save_stack_trace_tsk() only when called for the current task). This is similar
> to what was done for arm in 3683f44c42e9 ("ARM: stacktrace: avoid listing
> stacktrace functions in stacktrace") and is pending for arm64.
>
> Also make sure that __save_stack_trace_reliable() doesn't get this problem in
> the future by marking it __always_inline (which matches current gcc decision),
> per Josh Poimboeuf.
>
> Signed-off-by: Vlastimil Babka <vbabka@...e.cz>
Acked-by: Josh Poimboeuf <jpoimboe@...hat.com>
--
Josh
Powered by blists - more mailing lists