tracing/remotes: Add printk, dump_on_panic and boot parameters
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v10 Latest19 patches 0 repliesNew
- v921 patches 5 repliesSuperseded
- v821 patches 0 repliesSuperseded
Earlier versions · 7
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v7 | 20 patches | 0 replies | Superseded | |
| v6 | 18 patches | 6 replies | Superseded | |
| v5 | 18 patches | 7 replies | Superseded | |
| v4 | 18 patches | 6 replies | Superseded | |
| v3 | 18 patches | 0 replies | Superseded | |
| v2 | 18 patches | 0 replies | Superseded | |
| v1 | 13 patches | 0 replies | Superseded |
Changes in v10 from the cover letter
* Drop the already applied fixes for ring-buffer.
* Add READ_ONCE()/WRITE_ONCE() for remote->trace_buffer. (Sashiko)
* Replace smp_store_release() with WRITE_ONCE() when clearing
Patches in v10 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/19 | tracing/remotes: Gate tracefs files opening on trace remote registrationkernel/ | +87 | 0 replies | |
| 2/19 | tracing/remotes: Release tracefs,eventfs on registration failurekernel/ | +93 | 0 replies | |
| 3/19 | tracing/remotes: Use kstrtobool for boolean tracefs fileskernel/ | +6 | 0 replies | |
| 4/19 | tracing/remotes: Initialise pos in trace_start()kernel/ | +1 | 0 replies | |
| 5/19 | tracing/remotes: Annotate remote shared fields with READ_ONCE/WRITE_ONCEkernel/ | +11 | 0 replies | |
| 6/19 | tracing/remotes: Use a single per-remote polling workkernel/ | +35 | 0 replies | |
| 7/19 | tracing/simple_ring_buffer: Add support for compressed lengthinclude/ kernel/ kernel/ | +25 | 0 replies | |
| 8/19 | tracing/remotes: Add dmesg tracefs filekernel/ | +125 | 0 replies | |
| 9/19 | tracing/remotes: selftests: Add a test for the dmesg tracefs filetools/ tools/ tools/ | +103 | 0 replies | |
| 10/19 | tracing/remotes: selftests: Prefix hypervisor foldertools/ tools/ tools/ +4 more | +0 | 0 replies | |
| 11/19 | ring-buffer: Use panic-friendly locking in ring_buffer_iter interfacekernel/ | +18 | 0 replies | |
| 12/19 | ring-buffer: Add kerneldoc for ring_buffer_poll_remotekernel/ | +11 | 0 replies | |
| 13/19 | tracing/remotes: Use ring_buffer_capacity() in trace_remote_has_cpu()kernel/ | +1 | 0 replies | |
| 14/19 | tracing/remotes: Add dump_on_panic tracefs filekernel/ | +190 | 0 replies | |
| 15/19 | tracing/remotes: selftests: Add a test for the dump_on_panic tracefs filetools/ tools/ tools/ | +62 | 0 replies | |
| 16/19 | tracing/remotes: Add poll_ms tracefs filekernel/ | +44 | 0 replies | |
| 17/19 | tracing/remotes: Add trace_remote cmdline optionskernel/ | +145 | 0 replies | |
| 18/19 | Documentation: tracing/remotes: Add detailed tracefs layoutDocumentation/ | +62 | 0 replies | |
| 19/19 | Documentation/kernel-parameters: Add trace_remoteDocumentation/ | +19 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v10 yet.
Cover letter [PATCH v10 00/19] tracing/remotes: Add printk, dump_on_panic and boot parameters
This series extends the recently introduced trace remotes infrastructure, bringing useful features for developers:
* dump_on_panic: Dump the trace remote buffer on system panic.
* dmesg: Redirect remote events to dmesg.
* trace_remote=: Configure a trace_remote from the commandline.
* poll_ms: Modify the polling period.
It also brings a couple of optimisations:
* In-header compressed length support for small events.
* Single work thread for remote polling.
And some misc improvements:
* Use kstrtobool where possible
* Free resources on remote registration failure
Changelog:
v10:
* Drop the already applied fixes for ring-buffer.
* Add READ_ONCE()/WRITE_ONCE() for remote->trace_buffer. (Sashiko)
* Replace smp_store_release() with WRITE_ONCE() when clearing
remote->dmesg in trace_remote_iter_free().
v9 (https://lore.kernel.org/all/[email protected]/):
* Check IS_ERR_OR_NULL() for eventfs_create_events_dir() in trace_remote_init_eventfs(). (Sashiko)
* Avoid reading back rb_event->type_len in simple_ring_buffer_reserve(). (Sashiko)
* Pin write_event loop to a single CPU and handle CONFIG_PRINTK_CALLER in dmesg.tc. (Sashiko)
* Replace __free(kfree) with explicit kfree() in trace_remote_apply_cmdline(). (Sashiko)
* Rebase on 7.4-rc4
v8 (https://lore.kernel.org/all/[email protected]/):
* Use trylock in rb_reader_lock() when panic_on_this_cpu(). (Sashiko)
* Drop ring_buffer_read_remote_meta_page() and use ring_buffer_capacity() in trace_remote_has_cpu().
* Avoid mixing __free(kfree) with goto in trace_remote_iter(). (Sashiko)
* Cancel and reschedule poll_work on poll_ms update. (Sashiko)
* Validate buf_size and use WRITE_ONCE() for poll_ms in cmdline parsing. (Sashiko)
* Rebase on 7.4-rc1
v7 (https://lore.kernel.org/all/[email protected]/):
* Check for printk timestamps in dmesg selftest. (Sashiko)
* Touch NMI watchdog in the panic dump loop. (Sashiko)
* Add READ_ONCE()/WRITE_ONCE() for panic_on. (Sashiko)
* Defer dmesg and tracing enabling after all cmdline options are parsed. (Sashiko)
* Guard sysrq panic trigger in dump_on_panic.tc with TRIGGER_PANIC env variable. (Sashiko)
* Rebase on 7.3-rc4
v6 (https://lore.kernel.org/all/[email protected]/):
* Replace WARN_ON with pr_warn for buf_size in cmdline parsing. (Sashiko)
* Add READ_ONCE()/WRITE_ONCE() for poll_ms (Sashiko)
* Add support for HAVE_64BIT_ALIGNED_ACCESS arch is set in simple_ring_buffer. (Sashiko)
* Add selftest tracefs file requirements, TMPDIR leak, and awk regex. (Sashiko)
* Rebase on 7.2
v5 (https://lore.kernel.org/all/[email protected]/):
* Use seq_buf_str() for safe, properly terminated trace_seq extraction. (Steven)
* Remove destructive dmesg -c from selftests and rely on timestamp matching instead. (Steven)
* Allow several trace_remote=XXX cmdline options.
* Rebase on 7.2-rc7
v4 (https://lore.kernel.org/all/[email protected]/):
* Rebase on 7.2-rc6
* Use trace_append_boot_param() to parse cmdline options.
* Fix trace_remote_iterator cleanup order for non-consuming iterators
(Sashiko).
v3 (https://lore.kernel.org/all/[email protected]/):
* Make sure dmesg and panic handlers are using null-terminated trace_seq.
* Make struct trace_remote more compact
* Fix dump_on_panic test unloaded case (Sashiko)
* Rebase on 7.2-rc4
v2 (https://lore.kernel.org/all/[email protected]/):
Sashiko had a few spot-on comments on the v1 which forced me to heavily re-arrange the series, so I thought it'd be alright to send a v2 already including those changes.
* dump_on_oops -> dump_on_panic
* printk -> dmesg
* Allow to configure poll_ms
* Make the ring_buffer_iter functions panic-friendly
* Gate tracefs .open on remote registration (Sashiko)
* Use irqsave for reader lock (Sashiko)
* Fix iter locking for TRI_DMESG (Sashiko)
* Yield in the dmesg work (Sashiko)
v1 (https://lore.kernel.org/all/[email protected]/)
Vincent Donnefort (19):
tracing/remotes: Gate tracefs files opening on trace remote
registration
tracing/remotes: Release tracefs,eventfs on registration failure tracing/remotes: Use kstrtobool for boolean tracefs files tracing/remotes: Initialise pos in trace_start() tracing/remotes: Annotate remote shared fields with
READ_ONCE/WRITE_ONCE
tracing/remotes: Use a single per-remote polling work tracing/simple_ring_buffer: Add support for compressed length tracing/remotes: Add dmesg tracefs file
tracing/remotes: selftests: Add a test for the dmesg tracefs file tracing/remotes: selftests: Prefix hypervisor folder
ring-buffer: Use panic-friendly locking in ring_buffer_iter interface
ring-buffer: Add kerneldoc for ring_buffer_poll_remote tracing/remotes: Use ring_buffer_capacity() in trace_remote_has_cpu() tracing/remotes: Add dump_on_panic tracefs file tracing/remotes: selftests: Add a test for the dump_on_panic tracefs
file
tracing/remotes: Add poll_ms tracefs file
tracing/remotes: Add trace_remote cmdline options
Documentation: tracing/remotes: Add detailed tracefs layout Documentation/kernel-parameters: Add trace_remote
.../admin-guide/kernel-parameters.txt | 19 +
Documentation/trace/remotes.rst | 66 +-
include/linux/ring_buffer.h | 5 +
kernel/trace/ring_buffer.c | 39 +-
kernel/trace/simple_ring_buffer.c | 23 +-
kernel/trace/trace_remote.c | 853 +++++++++++++++---
.../buffer_size.tc | 0
.../test.d/remotes/00hypervisor/dmesg.tc | 11 +
.../remotes/00hypervisor/dump_on_panic.tc | 11 +
.../{hypervisor => 00hypervisor}/hotplug.tc | 0
.../{hypervisor => 00hypervisor}/reset.tc | 0
.../{hypervisor => 00hypervisor}/trace.tc | 0
.../trace_pipe.tc | 0
.../{hypervisor => 00hypervisor}/unloading.tc | 0
.../selftests/ftrace/test.d/remotes/dmesg.tc | 91 ++
.../ftrace/test.d/remotes/dump_on_panic.tc | 50 +
.../selftests/ftrace/test.d/remotes/functions | 2 +
17 files changed, 1024 insertions(+), 146 deletions(-)
rename tools/testing/selftests/ftrace/test.d/remotes/{hypervisor => 00hypervisor}/buffer_size.tc (100%)
create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/00hypervisor/dmesg.tc
create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/00hypervisor/dump_on_panic.tc
rename tools/testing/selftests/ftrace/test.d/remotes/{hypervisor => 00hypervisor}/hotplug.tc (100%)
rename tools/testing/selftests/ftrace/test.d/remotes/{hypervisor => 00hypervisor}/reset.tc (100%)
rename tools/testing/selftests/ftrace/test.d/remotes/{hypervisor => 00hypervisor}/trace.tc (100%)
rename tools/testing/selftests/ftrace/test.d/remotes/{hypervisor => 00hypervisor}/trace_pipe.tc (100%)
rename tools/testing/selftests/ftrace/test.d/remotes/{hypervisor => 00hypervisor}/unloading.tc (100%)
create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/dmesg.tc
create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/dump_on_panic.tcbase-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
Signature · 1 line
2.56.1.915.g69d5ec7298-goog