Skip to content

Commit 2fd4130

Browse files
committed
Merge tag 'trace-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull tracing updates from Steven Rostedt: "Trivial updates for 6.11: - Set rtla/osnoise default threshold to 1us from 5us The 5us default was missing noise that people cared about. Changing it to 1us makes it work as expected. - Restructure how sched_switch prev_comm and next_comm was being saved The prev_comm was being saved along with the other next fields, and the next_comm was being saved along with the other prev fields. This is just a cosmetic change. - Have the allocation of pid_list use GFP_NOWAIT instead of GFP_KERNEL The allocation can happen in irq_work context, but luckily, the size was by default so large, it was never triggered. But in case it ever is, use the NOWAIT allocation in the interrupt context. - Fix some kernel doc errors" * tag 'trace-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: trace/pid_list: Change gfp flags in pid_list_fill_irq() tracing/sched: sched_switch: place prev_comm and next_comm in right order rtla/osnoise: set the default threshold to 1us tracing: Fix trace_pid_list_free() kernel-doc
2 parents db2451e + 7dc8361 commit 2fd4130

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

Documentation/trace/osnoise-tracer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ The tracer has a set of options inside the osnoise directory, they are:
108108
option.
109109
- tracing_threshold: the minimum delta between two time() reads to be
110110
considered as noise, in us. When set to 0, the default value will
111-
be used, which is currently 5 us.
111+
be used, which is currently 1 us.
112112
- osnoise/options: a set of on/off options that can be enabled by
113113
writing the option name to the file or disabled by writing the option
114114
name preceded with the 'NO\_' prefix. For example, writing

include/trace/events/sched.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ TRACE_EVENT(sched_switch,
239239
),
240240

241241
TP_fast_assign(
242-
memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
242+
memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
243243
__entry->prev_pid = prev->pid;
244244
__entry->prev_prio = prev->prio;
245245
__entry->prev_state = __trace_sched_switch_state(preempt, prev_state, prev);
246-
memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
246+
memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
247247
__entry->next_pid = next->pid;
248248
__entry->next_prio = next->prio;
249249
/* XXX SCHED_DEADLINE */

kernel/trace/pid_list.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static void pid_list_refill_irq(struct irq_work *iwork)
354354
while (upper_count-- > 0) {
355355
union upper_chunk *chunk;
356356

357-
chunk = kzalloc(sizeof(*chunk), GFP_KERNEL);
357+
chunk = kzalloc(sizeof(*chunk), GFP_NOWAIT);
358358
if (!chunk)
359359
break;
360360
*upper_next = chunk;
@@ -365,7 +365,7 @@ static void pid_list_refill_irq(struct irq_work *iwork)
365365
while (lower_count-- > 0) {
366366
union lower_chunk *chunk;
367367

368-
chunk = kzalloc(sizeof(*chunk), GFP_KERNEL);
368+
chunk = kzalloc(sizeof(*chunk), GFP_NOWAIT);
369369
if (!chunk)
370370
break;
371371
*lower_next = chunk;
@@ -451,6 +451,7 @@ struct trace_pid_list *trace_pid_list_alloc(void)
451451

452452
/**
453453
* trace_pid_list_free - Frees an allocated pid_list.
454+
* @pid_list: The pid list to free.
454455
*
455456
* Frees the memory for a pid_list that was allocated.
456457
*/

kernel/trace/trace_osnoise.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,9 +1444,9 @@ static int run_osnoise(void)
14441444
save_osn_sample_stats(osn_var, &s);
14451445

14461446
/*
1447-
* if threshold is 0, use the default value of 5 us.
1447+
* if threshold is 0, use the default value of 1 us.
14481448
*/
1449-
threshold = tracing_thresh ? : 5000;
1449+
threshold = tracing_thresh ? : 1000;
14501450

14511451
/*
14521452
* Apply PREEMPT and IRQ disabled options.

0 commit comments

Comments
 (0)