]> Git Repo - linux.git/commit
tracing: Add snapshot refcount
authorVincent Donnefort <[email protected]>
Tue, 20 Feb 2024 20:23:07 +0000 (20:23 +0000)
committerSteven Rostedt (Google) <[email protected]>
Mon, 18 Mar 2024 14:12:47 +0000 (10:12 -0400)
commit180e4e390978af9d0cc060e87920c462276453b9
treeef13bfaaa3fd1823bc8fc0969866e951c0975e33
parentb70f2938242a028f8e9473781ede175486a59dc8
tracing: Add snapshot refcount

When a ring-buffer is memory mapped by user-space, no trace or
ring-buffer swap is possible. This means the snapshot feature is
mutually exclusive with the memory mapping. Having a refcount on
snapshot users will help to know if a mapping is possible or not.

Instead of relying on the global trace_types_lock, a new spinlock is
introduced to serialize accesses to trace_array->snapshot. This intends
to allow access to that variable in a context where the mmap lock is
already held.

Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
Signed-off-by: Vincent Donnefort <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_events_trigger.c
This page took 0.047888 seconds and 4 git commands to generate.