linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] tracing: Simplify and document the trace event filtering temp buffer code
@ 2021-06-09 22:04 Steven Rostedt
  2021-06-09 22:04 ` [PATCH 1/2] tracing: Simplify the max length test when using the filtering temp buffer Steven Rostedt
  2021-06-09 22:04 ` [PATCH 2/2] tracing: Add better comments for the filtering temp buffer use case Steven Rostedt
  0 siblings, 2 replies; 5+ messages in thread
From: Steven Rostedt @ 2021-06-09 22:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds, Ingo Molnar, Andrew Morton


When filtering trace events, a temp buffer is used because the extra copy
from the temp buffer into the ring buffer is still faster than the direct
write into the ring buffer followed by a discard if the filter does not
match.

But the data that can be stored in the temp buffer is a PAGE_SIZE minus the
ring buffer event header. The calculation of that header size is complex,
but using the helper macro "struct_size()" can simplify it.

Also, add more documentation about what is going on.

Link: https://lore.kernel.org/stable/CAHk-=whKbJkuVmzb0hD3N6q7veprUrSpiBHRxVY=AffWZPtxmg@mail.gmail.com/

Steven Rostedt (VMware) (2):
      tracing: Simplify the max length test when using the filtering temp buffer
      tracing: Add better comments for the filtering temp buffer use case

----
 kernel/trace/trace.c | 40 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-09 22:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 22:04 [PATCH 0/2] tracing: Simplify and document the trace event filtering temp buffer code Steven Rostedt
2021-06-09 22:04 ` [PATCH 1/2] tracing: Simplify the max length test when using the filtering temp buffer Steven Rostedt
2021-06-09 22:21   ` Linus Torvalds
2021-06-09 22:36     ` Steven Rostedt
2021-06-09 22:04 ` [PATCH 2/2] tracing: Add better comments for the filtering temp buffer use case Steven Rostedt

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).