diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-06-09 18:04:58 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-06-10 13:42:03 -0400 |
commit | faa76a6c289f43c88affcb292bc02870921d93bf (patch) | |
tree | 48605cec7494363fa92500802a9ae2f474d94641 /kernel/reboot.c | |
parent | 99f4f5d62338cab9dcf45735344541574daedd20 (diff) |
tracing: Simplify the max length test when using the filtering temp buffer
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.
Link: https://lore.kernel.org/stable/CAHk-=whKbJkuVmzb0hD3N6q7veprUrSpiBHRxVY=AffWZPtxmg@mail.gmail.com/
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/reboot.c')
0 files changed, 0 insertions, 0 deletions