Commit 2fd4130e authored by Linus Torvalds's avatar Linus Torvalds

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
parents db2451e7 7dc83618
...@@ -108,7 +108,7 @@ The tracer has a set of options inside the osnoise directory, they are: ...@@ -108,7 +108,7 @@ The tracer has a set of options inside the osnoise directory, they are:
option. option.
- tracing_threshold: the minimum delta between two time() reads to be - tracing_threshold: the minimum delta between two time() reads to be
considered as noise, in us. When set to 0, the default value will 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 - 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 writing the option name to the file or disabled by writing the option
name preceded with the 'NO\_' prefix. For example, writing name preceded with the 'NO\_' prefix. For example, writing
......
...@@ -239,11 +239,11 @@ TRACE_EVENT(sched_switch, ...@@ -239,11 +239,11 @@ TRACE_EVENT(sched_switch,
), ),
TP_fast_assign( 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_pid = prev->pid;
__entry->prev_prio = prev->prio; __entry->prev_prio = prev->prio;
__entry->prev_state = __trace_sched_switch_state(preempt, prev_state, prev); __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_pid = next->pid;
__entry->next_prio = next->prio; __entry->next_prio = next->prio;
/* XXX SCHED_DEADLINE */ /* XXX SCHED_DEADLINE */
......
...@@ -354,7 +354,7 @@ static void pid_list_refill_irq(struct irq_work *iwork) ...@@ -354,7 +354,7 @@ static void pid_list_refill_irq(struct irq_work *iwork)
while (upper_count-- > 0) { while (upper_count-- > 0) {
union upper_chunk *chunk; union upper_chunk *chunk;
chunk = kzalloc(sizeof(*chunk), GFP_KERNEL); chunk = kzalloc(sizeof(*chunk), GFP_NOWAIT);
if (!chunk) if (!chunk)
break; break;
*upper_next = chunk; *upper_next = chunk;
...@@ -365,7 +365,7 @@ static void pid_list_refill_irq(struct irq_work *iwork) ...@@ -365,7 +365,7 @@ static void pid_list_refill_irq(struct irq_work *iwork)
while (lower_count-- > 0) { while (lower_count-- > 0) {
union lower_chunk *chunk; union lower_chunk *chunk;
chunk = kzalloc(sizeof(*chunk), GFP_KERNEL); chunk = kzalloc(sizeof(*chunk), GFP_NOWAIT);
if (!chunk) if (!chunk)
break; break;
*lower_next = chunk; *lower_next = chunk;
...@@ -451,6 +451,7 @@ struct trace_pid_list *trace_pid_list_alloc(void) ...@@ -451,6 +451,7 @@ struct trace_pid_list *trace_pid_list_alloc(void)
/** /**
* trace_pid_list_free - Frees an allocated pid_list. * trace_pid_list_free - Frees an allocated pid_list.
* @pid_list: The pid list to free.
* *
* Frees the memory for a pid_list that was allocated. * Frees the memory for a pid_list that was allocated.
*/ */
......
...@@ -1444,9 +1444,9 @@ static int run_osnoise(void) ...@@ -1444,9 +1444,9 @@ static int run_osnoise(void)
save_osn_sample_stats(osn_var, &s); 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. * Apply PREEMPT and IRQ disabled options.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment