tracing: Last minute updates for 6.11
Subsystems (3)
Steven Rostedt
maintainercover tracing: Last minute updates for 6.11
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/for-next
Head SHA1: 7dc836187f7c6f70a82b4521503e9f9f96194581
Luis Claudio R. Goncalves (1):
rtla/osnoise: set the default threshold to 1us
Tio Zhang (1):
tracing/sched: sched_switch: place prev_comm and next_comm in right order
levi.yun (1):
trace/pid_list: Change gfp flags in pid_list_fill_irq()
----
Documentation/trace/osnoise-tracer.rst | 2 +- include/trace/events/sched.h | 4 ++-- kernel/trace/pid_list.c | 4 ++-- kernel/trace/trace_osnoise.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)
Steven Rostedt
maintainerPATCH 1/3 rtla/osnoise: set the default threshold to 1us
From: "Luis Claudio R. Goncalves" <[email protected]>
Change the default threshold for osnoise to 1us, so that any noise equal or above this value is recorded. Let the user set a higher threshold if necessary.
--- Documentation/trace/osnoise-tracer.rst | 2 +- kernel/trace/trace_osnoise.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/trace/osnoise-tracer.rst +1 -1
@@ -108,7 +108,7 @@ The tracer has a set of options inside the osnoise directory, they are: option. - tracing_threshold: the minimum delta between two time() reads to be considered as noise, in us. When set to 0, the default value will - be used, which is currently 5 us. + be used, which is currently 1 us. - osnoise/options: a set of on/off options that can be enabled by writing the option name to the file or disabled by writing the option name preceded with the 'NO\_' prefix. For example, writing
kernel/trace/trace_osnoise.c +2 -2
@@ -1444,9 +1444,9 @@ static int run_osnoise(void)save_osn_sample_stats (osn_var, &s);/* -* if threshold is 0, use the default value of 5 us. +* if threshold is 0, use the default value of 1 us. */ - threshold = tracing_thresh ? :5000 ; + threshold = tracing_thresh ? :1000 ;/* * Apply PREEMPT and IRQ disabled options.
Signature · 1 line
2.43.0
Steven Rostedt
maintainerPATCH 2/3 tracing/sched: sched_switch: place prev_comm and next_comm in right order
In reply to Steven RostedtFrom: Tio Zhang <[email protected]>
Switch the order of prev_comm and next_comm in sched_switch's code to align with its printing order.
--- include/trace/events/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/trace/events/sched.h +2 -2
@@ -239,11 +239,11 @@ TRACE_EVENT(sched_switch, ),TP_fast_assign ( - memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); + memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); __entry->prev_pid = prev->pid; __entry->prev_prio = prev->prio; __entry->prev_state =__trace_sched_switch_state (preempt, prev_state, prev); -memcpy (__entry->prev_comm, prev->comm,TASK_COMM_LEN ); +memcpy (__entry->next_comm, next->comm,TASK_COMM_LEN ); __entry->next_pid = next->pid; __entry->next_prio = next->prio;/* XXX SCHED_DEADLINE */
Signature · 1 line
2.43.0
Steven Rostedt
maintainerPATCH 3/3 trace/pid_list: Change gfp flags in pid_list_fill_irq()
In reply to Steven RostedtFrom: "levi.yun" <[email protected]>
pid_list_fill_irq() runs via irq_work.
When CONFIG_PREEMPT_RT is disabled, it would run in irq_context. so it shouldn't sleep while memory allocation.
Change gfp flags from GFP_KERNEL to GFP_NOWAIT to prevent sleep in irq_work.
This change wouldn't impact functionality in practice because the worst-size is 2K.
--- kernel/trace/pid_list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/pid_list.c +2 -2
@@ -354,7 +354,7 @@ static void pid_list_refill_irq(struct irq_work *iwork)while (upper_count-- >0 ) {union upper_chunk *chunk; - chunk =kzalloc (sizeof (*chunk),GFP_KERNEL ); + chunk =kzalloc (sizeof (*chunk),GFP_NOWAIT );if (!chunk)break ; *upper_next = chunk;
@@ -365,7 +365,7 @@ static void pid_list_refill_irq(struct irq_work *iwork)while (lower_count-- >0 ) {union lower_chunk *chunk; - chunk =kzalloc (sizeof (*chunk),GFP_KERNEL ); + chunk =kzalloc (sizeof (*chunk),GFP_NOWAIT );if (!chunk)break ; *lower_next = chunk;
Signature · 1 line
2.43.0