diff options
| author | Steven Rostedt <[email protected]> | 2025-07-29 18:23:12 +0000 |
|---|---|---|
| committer | Steven Rostedt (Google) <[email protected]> | 2025-07-31 14:20:11 +0000 |
| commit | 858fa8a3b083e862114bb6483b9fb50b3e2bc4c3 (patch) | |
| tree | d73249068f772123fb9586d2e67f5e7a32341a52 /rust/helpers | |
| parent | unwind deferred: Add unwind_completed mask to stop spurious callbacks (diff) | |
| download | kernel-858fa8a3b083e862114bb6483b9fb50b3e2bc4c3.tar.gz kernel-858fa8a3b083e862114bb6483b9fb50b3e2bc4c3.zip | |
unwind: Add USED bit to only have one conditional on way back to user space
On the way back to user space, the function unwind_reset_info() is called
unconditionally (but always inlined). It currently has two conditionals.
One that checks the unwind_mask which is set whenever a deferred trace is
called and is used to know that the mask needs to be cleared. The other
checks if the cache has been allocated, and if so, it resets the
nr_entries so that the unwinder knows it needs to do the work to get a new
user space stack trace again (it only does it once per entering the
kernel).
Use one of the bits in the unwind mask as a "USED" bit that gets set
whenever a trace is created. This will make it possible to only check the
unwind_mask in the unwind_reset_info() to know if it needs to do work or
not and eliminates a conditional that happens every time the task goes
back to user space.
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Andrii Nakryiko <[email protected]>
Cc: Indu Bhagat <[email protected]>
Cc: "Jose E. Marchesi" <[email protected]>
Cc: Beau Belgrave <[email protected]>
Cc: Jens Remus <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Florian Weimer <[email protected]>
Cc: Sam James <[email protected]>
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'rust/helpers')
0 files changed, 0 insertions, 0 deletions
