All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	x86@kernel.org, Jiri Olsa <jolsa@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH v7 00/17] unwind_user: perf: x86: Deferred unwinding infrastructure
Date: Sun, 4 May 2025 12:32:28 -0400	[thread overview]
Message-ID: <20250504123228.0e8a92ae@batman.local.home> (raw)
In-Reply-To: <aBc2ZBlQTpybK3Z-@gmail.com>

On Sun, 4 May 2025 11:41:56 +0200
Ingo Molnar <mingo@kernel.org> wrote:

> * Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> >       unwind_user: Add user space unwinding API
> >       unwind_user: Add frame pointer support
> >       unwind_user/x86: Enable frame pointer unwinding on x86
> >       perf/x86: Rename and move get_segment_base() and make it global
> >       unwind_user: Add compat mode frame pointer support
> >       unwind_user/x86: Enable compat mode frame pointer unwinding on x86
> >       unwind_user/deferred: Add unwind cache  
> 
> What is the cost of 'caching' here? Will we double-buffer the tracing 
> data before it reaches its single primary tooling user, with no use of 
> any actual 'caching', which will be scenario in like 99.9% of the 
> everyday usecases when this facility is used?

I'm sorry, I may not understand the question here.

The cache doesn't add any extra buffer. The previous patch (Add unwind
deferred trace) allocates "entries" the first time a trace is done to
save the user stacktrace into the buffer. It will not free the entries
(until exit of the task) to save from having to allocate the entries
again.

If for some reason an interrupt happens while it is recording the trace
and the interrupt requests another trace, without the cache, it will do
the work of walking the user stack trace again.

The "cache" code, simply keeps information around to know that the
current trace is still valid, and that it doesn't need to do the work
of walking the user stack to produce the stack again.

> 
> >       unwind_user/deferred: Add deferred unwinding interface
> >       unwind_user/deferred: Make unwind deferral requests NMI-safe
> >       perf: Remove get_perf_callchain() init_nr argument
> >       perf: Have get_perf_callchain() return NULL if crosstask and user are set
> >       perf: Simplify get_perf_callchain() user logic
> >       perf: Skip user unwind if the task is a kernel thread.  
> 
> Please don't leave periods in titles.

OK, will fix.

Thanks for looking at this Ingo!

-- Steve

      reply	other threads:[~2025-05-04 16:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-02 16:47 [PATCH v7 00/17] unwind_user: perf: x86: Deferred unwinding infrastructure Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 01/17] unwind_user: Add user space unwinding API Steven Rostedt
2025-05-04  9:30   ` Ingo Molnar
2025-05-04 16:43     ` Steven Rostedt
2025-05-04 17:53       ` Josh Poimboeuf
2025-05-02 16:47 ` [PATCH v7 02/17] unwind_user: Add frame pointer support Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 03/17] unwind_user/x86: Enable frame pointer unwinding on x86 Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 04/17] perf/x86: Rename and move get_segment_base() and make it global Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 05/17] unwind_user: Add compat mode frame pointer support Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 06/17] unwind_user/x86: Enable compat mode frame pointer unwinding on x86 Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 07/17] unwind_user/deferred: Add unwind_deferred_trace() Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 08/17] unwind_user/deferred: Add unwind cache Steven Rostedt
2025-05-04  9:37   ` Ingo Molnar
2025-05-04 16:21     ` Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 09/17] unwind_user/deferred: Add deferred unwinding interface Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 10/17] unwind_user/deferred: Make unwind deferral requests NMI-safe Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 11/17] unwind deferred: Use bitmask to determine which callbacks to call Steven Rostedt
2025-05-09  1:36   ` Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 12/17] unwind deferred: Use SRCU unwind_deferred_task_work() Steven Rostedt
2025-05-02 16:47 ` [PATCH v7 13/17] perf: Remove get_perf_callchain() init_nr argument Steven Rostedt
2025-05-02 16:48 ` [PATCH v7 14/17] perf: Have get_perf_callchain() return NULL if crosstask and user are set Steven Rostedt
2025-05-02 16:48 ` [PATCH v7 15/17] perf: Use current->flags & PF_KTHREAD instead of current->mm == NULL Steven Rostedt
2025-05-02 16:48 ` [PATCH v7 16/17] perf: Simplify get_perf_callchain() user logic Steven Rostedt
2025-05-02 16:48 ` [PATCH v7 17/17] perf: Skip user unwind if the task is a kernel thread Steven Rostedt
2025-05-04  9:41 ` [PATCH v7 00/17] unwind_user: perf: x86: Deferred unwinding infrastructure Ingo Molnar
2025-05-04 16:32   ` Steven Rostedt [this message]

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=20250504123228.0e8a92ae@batman.local.home \
    --to=rostedt@goodmis.org \
    --cc=jolsa@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.