All of lore.kernel.org
 help / color / mirror / Atom feed
* trace/latency-hist: Consider new argument when probing the sched_switch tracer
@ 2016-01-05  9:21 Carsten Emde
  2016-01-13 15:45 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 6+ messages in thread
From: Carsten Emde @ 2016-01-05  9:21 UTC (permalink / raw)
  To: Thomas Gleixner, Sebastian Andrzej Siewior; +Cc: Linux RT Users

Hi Thomas & Sebastian,

The sched_switch tracer has got a new argument. Fix the latency tracer
accordingly.

Thanks,
    -Carsten.

Signed-off-by: Carsten Emde <C.Emde@osadl.org>

---
 kernel/trace/latency_hist.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-4.4.0-rc6-rt1/kernel/trace/latency_hist.c
===================================================================
--- linux-4.4.0-rc6-rt1.orig/kernel/trace/latency_hist.c
+++ linux-4.4.0-rc6-rt1/kernel/trace/latency_hist.c
@@ -117,7 +117,7 @@ static char *wakeup_latency_hist_dir_sha
 static notrace void probe_wakeup_latency_hist_start(void *v,
 	struct task_struct *p);
 static notrace void probe_wakeup_latency_hist_stop(void *v,
-	struct task_struct *prev, struct task_struct *next);
+	bool preempt, struct task_struct *prev, struct task_struct *next);
 static notrace void probe_sched_migrate_task(void *,
 	struct task_struct *task, int cpu);
 static struct enable_data wakeup_latency_enabled_data = {
@@ -907,7 +907,7 @@ out:
 }

 static notrace void probe_wakeup_latency_hist_stop(void *v,
-	struct task_struct *prev, struct task_struct *next)
+	bool preempt, struct task_struct *prev, struct task_struct *next)
 {
 	unsigned long flags;
 	int cpu = task_cpu(next);

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: trace/latency-hist: Consider new argument when probing the sched_switch tracer
  2016-01-05  9:21 trace/latency-hist: Consider new argument when probing the sched_switch tracer Carsten Emde
@ 2016-01-13 15:45 ` Sebastian Andrzej Siewior
  2016-01-13 15:51   ` Steven Rostedt
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2016-01-13 15:45 UTC (permalink / raw)
  To: Carsten Emde; +Cc: Thomas Gleixner, Linux RT Users, Steven Rostedt

* Carsten Emde | 2016-01-05 10:21:59 [+0100]:

>Hi Thomas & Sebastian,
Hi Carsten,

>The sched_switch tracer has got a new argument. Fix the latency tracer
>accordingly.
>
>Thanks,
>    -Carsten.
>
>Signed-off-by: Carsten Emde <C.Emde@osadl.org>

Thanks.
Is it somehow possible to detect this kind of bugs at compile time? Is
there an easy way to do this?
What is blocking the latency-hist tracer from entering mainline?

Sebastian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: trace/latency-hist: Consider new argument when probing the sched_switch tracer
  2016-01-13 15:45 ` Sebastian Andrzej Siewior
@ 2016-01-13 15:51   ` Steven Rostedt
  2016-01-13 16:08     ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Rostedt @ 2016-01-13 15:51 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: Carsten Emde, Thomas Gleixner, Linux RT Users

On Wed, 13 Jan 2016 16:45:26 +0100
Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:


> Is it somehow possible to detect this kind of bugs at compile time? Is
> there an easy way to do this?

There should have been a warning. Wasn't there one?

> What is blocking the latency-hist tracer from entering mainline?

Has it been submitted. Like lots of things in -rt, it just takes the
effort of pushing out an RFC for inclusion.

-- Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: trace/latency-hist: Consider new argument when probing the sched_switch tracer
  2016-01-13 15:51   ` Steven Rostedt
@ 2016-01-13 16:08     ` Sebastian Andrzej Siewior
  2016-01-15 11:30       ` Carsten Emde
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2016-01-13 16:08 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Carsten Emde, Thomas Gleixner, Linux RT Users

On 01/13/2016 04:51 PM, Steven Rostedt wrote:
> On Wed, 13 Jan 2016 16:45:26 +0100
> Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> 
>> Is it somehow possible to detect this kind of bugs at compile time? Is
>> there an easy way to do this?
> 
> There should have been a warning. Wasn't there one?

Sorry, my bad. I didn't enable it… Yes, there is one.

>> What is blocking the latency-hist tracer from entering mainline?
> 
> Has it been submitted. Like lots of things in -rt, it just takes the
> effort of pushing out an RFC for inclusion.

Not that I recall. But this means that there is nothing specific that
you are aware of that needs to be changed before RFC.

So, Carsten do you mind taking the latency-hist patch and submitting it
as RFC for upstream inclusion?

> -- Steve
> 
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: trace/latency-hist: Consider new argument when probing the sched_switch tracer
  2016-01-13 16:08     ` Sebastian Andrzej Siewior
@ 2016-01-15 11:30       ` Carsten Emde
  2016-01-15 14:05         ` Steven Rostedt
  0 siblings, 1 reply; 6+ messages in thread
From: Carsten Emde @ 2016-01-15 11:30 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior, Steven Rostedt; +Cc: Thomas Gleixner, Linux RT Users

Hi Sebastian, hi Steven,

>>> [..] What is blocking the latency-hist tracer from entering
>>> mainline?
>> 
>> Has it been submitted. Like lots of things in -rt, it just takes
>> the effort of pushing out an RFC for inclusion.
> 
> Not that I recall. But this means that there is nothing specific
> that you are aware of that needs to be changed before RFC.
> 
> So, Carsten do you mind taking the latency-hist patch and submitting
> it as RFC for upstream inclusion?
There are two things here:

1. The sum of the timer latency and the wakeup latency does not completely
cover the total preemption latency as, for example, determined by cyclictest.
The time of the context switch until the new task resumes execution at the
next line after the wait instruction is still lacking. I wrote a related
patch sometime ago that is working since then in numerous farm systems -
but I never posted the patch of this switchtime histogram, because someone
said that we first need to re-engineer the histogram code in general.
Nevertheless, I used the opportunity of your posting to submit the patch in
a separate thread so you can have a look. As a bonus, the name of the
delayed system call that caused the highest latency until then is provided
when the switchtime histogram is enabled - this may or may not be helpful
when searching for the source of a latency.

2. The idea behind re-engineering the histogram code someone proposed several
years ago is to create a general framework that can be used throughout the
kernel (or even from user space through a dedicated tracer interface) for any
variable the frequency distribution of which is of interest and that would
best be monitored in form of a frequency histogram - such as a latency
distribution. The various latency tracers would then serve as a practical
example of how to use this fancy new framework. I let you guess why this
re-engineering did not yet happen.

So the question is whether you still encourage me to write the RFC for
upstream inclusion of the current code after some polishing - maybe, in the
hope that someone will come up with the framework during RFC discussion -
or we better wait, since writing an RFC for hopeless code really doesn't
make sense.

Thanks,
	-Carsten.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: trace/latency-hist: Consider new argument when probing the sched_switch tracer
  2016-01-15 11:30       ` Carsten Emde
@ 2016-01-15 14:05         ` Steven Rostedt
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2016-01-15 14:05 UTC (permalink / raw)
  To: Carsten Emde; +Cc: Sebastian Andrzej Siewior, Thomas Gleixner, Linux RT Users

On Fri, 15 Jan 2016 12:30:55 +0100
Carsten Emde <C.Emde@osadl.org> wrote:


> So the question is whether you still encourage me to write the RFC for
> upstream inclusion of the current code after some polishing - maybe, in the
> hope that someone will come up with the framework during RFC discussion -
> or we better wait, since writing an RFC for hopeless code really doesn't
> make sense.

Note, the latency measurement code is basically the last code that is
practically untouched from what was in the original latency-tracer code
from the -rt patch. It's been on my todo list to update it for some
time. There's a few things lacking with it. I want to improve that.

Perhaps this should be done before pushing in a histogram
infrastructure on top of it. I'll move this up on my priority list.

-- Steve


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-15 14:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05  9:21 trace/latency-hist: Consider new argument when probing the sched_switch tracer Carsten Emde
2016-01-13 15:45 ` Sebastian Andrzej Siewior
2016-01-13 15:51   ` Steven Rostedt
2016-01-13 16:08     ` Sebastian Andrzej Siewior
2016-01-15 11:30       ` Carsten Emde
2016-01-15 14:05         ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.