linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fwd: Question about PREEMPT_RT and wakeup_rt latency
       [not found] <CAL8zT=hcP=z_iM+rcUcaTOXLMqVDVn=gbnybp-Q-cmAyKJCzUg@mail.gmail.com>
@ 2019-06-25 13:40 ` Jean-Michel Hautbois
  2019-07-03 13:13   ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 2+ messages in thread
From: Jean-Michel Hautbois @ 2019-06-25 13:40 UTC (permalink / raw)
  To: linux-rt-users

Hi,

I am currently using for a customer a 5.0.19-rt11 on an i.MX6 and it
works very well ! :)

I have a latency issue, and tried to use wakeup_rt latency to detect
it but I am not sure to really understand the output of ftrace...
From what I understand, the interrupt "irq/28" is having a latency of
~2ms ?? It sound like a very big latency !

And this customer has forced affinity and priorities on its threads,
and I think it could explain such a behaviour ? For instance the task
named "tLaserLo-762" is in fact forced with an affinity of 2 and a
priority of SCHED_FIFO 30.

https://framabin.org/p/?e63c638b5cf2e4ec#GS6ahFDEI/m6vyY2lwafB96vbgA4Skft1d+Dvtry2QI=

I think it gives a very nice example of what preemption really is, but
it can be confusing.
Can it be traced with kernelshark or something else ?

Thanks,
JM

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

* Re: Fwd: Question about PREEMPT_RT and wakeup_rt latency
  2019-06-25 13:40 ` Fwd: Question about PREEMPT_RT and wakeup_rt latency Jean-Michel Hautbois
@ 2019-07-03 13:13   ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-07-03 13:13 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: linux-rt-users

On 2019-06-25 15:40:56 [+0200], Jean-Michel Hautbois wrote:
> Hi,
Hi,

> I have a latency issue, and tried to use wakeup_rt latency to detect
> it but I am not sure to really understand the output of ftrace...
> >From what I understand, the interrupt "irq/28" is having a latency of
> ~2ms ?? It sound like a very big latency !

From the trace, looking only at cpu0 ->
- irq/28-c-256 is scheduled until 1581us which 1.5ms.
- irq/57-2-122 is scheduled until 2287us another 706us

and so on.

> And this customer has forced affinity and priorities on its threads,
> and I think it could explain such a behaviour ? For instance the task
> named "tLaserLo-762" is in fact forced with an affinity of 2 and a
> priority of SCHED_FIFO 30.
> 
> https://framabin.org/p/?e63c638b5cf2e4ec#GS6ahFDEI/m6vyY2lwafB96vbgA4Skft1d+Dvtry2QI=

it is not the nicest pastebin page to grab the bare text file from…

> I think it gives a very nice example of what preemption really is, but
> it can be confusing.
> Can it be traced with kernelshark or something else ?

you could try to trace with kernelshark and enable the scheduling
events. You should be able to see when a task is woken up and when it
finally got on the CPU. And then you can decide what to do.

> Thanks,
> JM

Sebastian

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

end of thread, other threads:[~2019-07-03 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAL8zT=hcP=z_iM+rcUcaTOXLMqVDVn=gbnybp-Q-cmAyKJCzUg@mail.gmail.com>
2019-06-25 13:40 ` Fwd: Question about PREEMPT_RT and wakeup_rt latency Jean-Michel Hautbois
2019-07-03 13:13   ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).