* [for-next][PATCH 0/3] tracing: Last minute updates for 6.11
@ 2024-07-16 18:06 Steven Rostedt
2024-07-16 18:06 ` [for-next][PATCH 1/3] rtla/osnoise: set the default threshold to 1us Steven Rostedt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Steven Rostedt @ 2024-07-16 18:06 UTC (permalink / raw)
To: linux-kernel
Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton
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(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [for-next][PATCH 1/3] rtla/osnoise: set the default threshold to 1us
2024-07-16 18:06 [for-next][PATCH 0/3] tracing: Last minute updates for 6.11 Steven Rostedt
@ 2024-07-16 18:06 ` Steven Rostedt
2024-07-16 18:06 ` [for-next][PATCH 2/3] tracing/sched: sched_switch: place prev_comm and next_comm in right order Steven Rostedt
2024-07-16 18:06 ` [for-next][PATCH 3/3] trace/pid_list: Change gfp flags in pid_list_fill_irq() Steven Rostedt
2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2024-07-16 18:06 UTC (permalink / raw)
To: linux-kernel
Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
Jonathan Corbet, Daniel Bristot de Oliveira, Clark Williams,
Luis Claudio R. Goncalves
From: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
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.
Link: https://lore.kernel.org/linux-trace-kernel/Zmb-QhiiiI6jM9To@uudg.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Suggested-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Reviewed-by: Clark Williams <williams@redhat.com>
Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
Documentation/trace/osnoise-tracer.rst | 2 +-
kernel/trace/trace_osnoise.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/trace/osnoise-tracer.rst b/Documentation/trace/osnoise-tracer.rst
index 140ef2533d26..a520adbd3476 100644
--- a/Documentation/trace/osnoise-tracer.rst
+++ b/Documentation/trace/osnoise-tracer.rst
@@ -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
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index a8e28f9b9271..66a871553d4a 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -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.
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [for-next][PATCH 2/3] tracing/sched: sched_switch: place prev_comm and next_comm in right order
2024-07-16 18:06 [for-next][PATCH 0/3] tracing: Last minute updates for 6.11 Steven Rostedt
2024-07-16 18:06 ` [for-next][PATCH 1/3] rtla/osnoise: set the default threshold to 1us Steven Rostedt
@ 2024-07-16 18:06 ` Steven Rostedt
2024-07-16 18:06 ` [for-next][PATCH 3/3] trace/pid_list: Change gfp flags in pid_list_fill_irq() Steven Rostedt
2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2024-07-16 18:06 UTC (permalink / raw)
To: linux-kernel
Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
Tio Zhang, Madadi Vineeth Reddy
From: Tio Zhang <tiozhang@didiglobal.com>
Switch the order of prev_comm and next_comm in sched_switch's code to
align with its printing order.
Cc: <mhiramat@kernel.org>
Signed-off-by: Tio Zhang <tiozhang@didiglobal.com>
Link: https://lore.kernel.org/20240703033353.GA2833@didi-ThinkCentre-M930t-N000
Reviewed-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
include/trace/events/sched.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 6df2b4685b08..9ea4c404bd4e 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -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 */
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [for-next][PATCH 3/3] trace/pid_list: Change gfp flags in pid_list_fill_irq()
2024-07-16 18:06 [for-next][PATCH 0/3] tracing: Last minute updates for 6.11 Steven Rostedt
2024-07-16 18:06 ` [for-next][PATCH 1/3] rtla/osnoise: set the default threshold to 1us Steven Rostedt
2024-07-16 18:06 ` [for-next][PATCH 2/3] tracing/sched: sched_switch: place prev_comm and next_comm in right order Steven Rostedt
@ 2024-07-16 18:06 ` Steven Rostedt
2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2024-07-16 18:06 UTC (permalink / raw)
To: linux-kernel
Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
stable, levi.yun
From: "levi.yun" <yeoreum.yun@arm.com>
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.
Cc: stable@goodmis.org
Fixes: 8d6e90983ade2 ("tracing: Create a sparse bitmask for pid filtering")
Link: https://lore.kernel.org/20240704150226.1359936-1-yeoreum.yun@arm.com
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: levi.yun <yeoreum.yun@arm.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
kernel/trace/pid_list.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/pid_list.c b/kernel/trace/pid_list.c
index 19b271a12c99..4966e6bbdf6f 100644
--- a/kernel/trace/pid_list.c
+++ b/kernel/trace/pid_list.c
@@ -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;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-16 18:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-16 18:06 [for-next][PATCH 0/3] tracing: Last minute updates for 6.11 Steven Rostedt
2024-07-16 18:06 ` [for-next][PATCH 1/3] rtla/osnoise: set the default threshold to 1us Steven Rostedt
2024-07-16 18:06 ` [for-next][PATCH 2/3] tracing/sched: sched_switch: place prev_comm and next_comm in right order Steven Rostedt
2024-07-16 18:06 ` [for-next][PATCH 3/3] trace/pid_list: Change gfp flags in pid_list_fill_irq() Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox