Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+8 -7
+1 -1
Documentation/trace/osnoise-tracer.rst
··· 108 108 option. 109 109 - tracing_threshold: the minimum delta between two time() reads to be 110 110 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. 112 112 - osnoise/options: a set of on/off options that can be enabled by 113 113 writing the option name to the file or disabled by writing the option 114 114 name preceded with the 'NO\_' prefix. For example, writing
+2 -2
include/trace/events/sched.h
··· 239 239 ), 240 240 241 241 TP_fast_assign( 242 - memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); 242 + memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); 243 243 __entry->prev_pid = prev->pid; 244 244 __entry->prev_prio = prev->prio; 245 245 __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); 247 247 __entry->next_pid = next->pid; 248 248 __entry->next_prio = next->prio; 249 249 /* XXX SCHED_DEADLINE */
+3 -2
kernel/trace/pid_list.c
··· 354 354 while (upper_count-- > 0) { 355 355 union upper_chunk *chunk; 356 356 357 - chunk = kzalloc(sizeof(*chunk), GFP_KERNEL); 357 + chunk = kzalloc(sizeof(*chunk), GFP_NOWAIT); 358 358 if (!chunk) 359 359 break; 360 360 *upper_next = chunk; ··· 365 365 while (lower_count-- > 0) { 366 366 union lower_chunk *chunk; 367 367 368 - chunk = kzalloc(sizeof(*chunk), GFP_KERNEL); 368 + chunk = kzalloc(sizeof(*chunk), GFP_NOWAIT); 369 369 if (!chunk) 370 370 break; 371 371 *lower_next = chunk; ··· 451 451 452 452 /** 453 453 * trace_pid_list_free - Frees an allocated pid_list. 454 + * @pid_list: The pid list to free. 454 455 * 455 456 * Frees the memory for a pid_list that was allocated. 456 457 */
+2 -2
kernel/trace/trace_osnoise.c
··· 1444 1444 save_osn_sample_stats(osn_var, &s); 1445 1445 1446 1446 /* 1447 - * if threshold is 0, use the default value of 5 us. 1447 + * if threshold is 0, use the default value of 1 us. 1448 1448 */ 1449 - threshold = tracing_thresh ? : 5000; 1449 + threshold = tracing_thresh ? : 1000; 1450 1450 1451 1451 /* 1452 1452 * Apply PREEMPT and IRQ disabled options.