linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Miroslav Benes <mbenes@suse.cz>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] x86, stacktrace: avoid recording save_stack_trace wrappers
Date: Fri, 29 Sep 2017 10:57:33 -0500	[thread overview]
Message-ID: <20170929155733.y4csusut3bmucght@treble> (raw)
In-Reply-To: <20170929092335.2744-1-vbabka@suse.cz>

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@suse.cz>

Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>

-- 
Josh

  reply	other threads:[~2017-09-29 15:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07  7:57 [PATCH] x86, stacktrace: avoid recording save_stack_trace wrappers Vlastimil Babka
2017-09-07 13:07 ` Josh Poimboeuf
2017-09-29  9:23 ` [PATCH v2] " Vlastimil Babka
2017-09-29 15:57   ` Josh Poimboeuf [this message]
2017-09-29 20:15   ` [tip:x86/debug] x86/stacktrace: Avoid recording save_stack_trace() wrappers tip-bot for Vlastimil Babka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170929155733.y4csusut3bmucght@treble \
    --to=jpoimboe@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).