All of lore.kernel.org
 help / color / mirror / Atom feed
* intel j1900 and i915 realtime problems
@ 2019-05-22 12:10 Stéphane Ancelot
       [not found] ` <f1670f5a-6a78-634b-914a-cb26e2ce74aa@fastwebnet.it>
  2019-05-31 16:51 ` Giuliano Colla
  0 siblings, 2 replies; 4+ messages in thread
From: Stéphane Ancelot @ 2019-05-22 12:10 UTC (permalink / raw)
  To: linux-rt-users

Hi,

I have got a problem with a celeron j1900 platform and i915 driver.

I have 3 realtime tasks that are launched sequentially.

task1 is clocked periodically at 3ms.

task1 wakes up task2 and takes 2 wakes up task 3 using priority 
scheduling (and SCHED_FIFO mechanism).

everything works well, until I am using graphic applications with 
activity (hide/show gui programs...,widgets creation /refresh etc).

The task1 always start periodically each 3ms, but the other threads 
execution time are delayed.

I mean normally, the whole computing processing timing 
(task1+task2+task3) takes normally around 800us time execution.

When I stress the graphic pages, This time becomes up to 1.6ms.

The 3 tasks are isolated on a cpu. I don't think the problem is involved 
by the CPU, but more by i915 driver and memory.

I have not managed to identify the right reason with perf utility.

One thing I am sure :

if I run the same gui pages through an ssh shell, the problem has not 
appeared. realtime is not "broken"

I know that the intel driver is involved.

I would need some help to identify the right problem and for finding 
solutions.ideas.

Regards,

S.Ancelot


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

* Re: intel j1900 and i915 realtime problems
       [not found] ` <f1670f5a-6a78-634b-914a-cb26e2ce74aa@fastwebnet.it>
@ 2019-05-24  8:38   ` Stéphane Ancelot
  0 siblings, 0 replies; 4+ messages in thread
From: Stéphane Ancelot @ 2019-05-24  8:38 UTC (permalink / raw)
  To: Giuliano Colla, linux-rt-users


>> Hi,
>>
>> I have got a problem with a celeron j1900 platform and i915 driver.
>>
>> I have 3 realtime tasks that are launched sequentially.
>>
>> task1 is clocked periodically at 3ms.
>>
>> task1 wakes up task2 and takes 2 wakes up task 3 using priority 
>> scheduling (and SCHED_FIFO mechanism).
>>
>> everything works well, until I am using graphic applications with 
>> activity (hide/show gui programs...,widgets creation /refresh etc).
>>
>> The task1 always start periodically each 3ms, but the other threads 
>> execution time are delayed.
>>
>> I mean normally, the whole computing processing timing 
>> (task1+task2+task3) takes normally around 800us time execution.
>>
>> When I stress the graphic pages, This time becomes up to 1.6ms.
>>
>> The 3 tasks are isolated on a cpu. I don't think the problem is 
>> involved by the CPU, but more by i915 driver and memory.
>>
>> I have not managed to identify the right reason with perf utility.
>>
>> One thing I am sure :
>>
>> if I run the same gui pages through an ssh shell, the problem has not 
>> appeared. realtime is not "broken"
>>
>> I know that the intel driver is involved.
>>
>> I would need some help to identify the right problem and for finding 
>> solutions.ideas.
>>
>> Regards,
>>
>
> What priorities you have given to your RT tasks?
>
my 3 RT Tasks have the following priorities:

task1: 47

task2 : 48

task3 : 49

Higher priorities don't solve the problem. It is important to notice my 
resolution is  1280x1024 /  19inch vertical orientation display,


> I have experienced that running on an isolated CPU is not enough to 
> ensure that the scheduling of your tasks is not influenced by other 
> activities. In order to have my RT tasks running properly, I've been 
> forced not only to set policy to SCHED_FIFO, but also to set a 
> priority as high as possible, sort of:
>        mysched.sched_priority = 99;
>          if( sched_setscheduler( 0, policy, &mysched ) == -1 ) {
> 	......
> for the first task, and slghtly lower priorities to the others.
>
> Then with *top *you may see where are positioned your tasks in the 
> scheduler priority.
>
> Here's a snapshot of Top output (sorted by priority), with my 15 RT 
> tasks being, in order of priority, /ymain/ to /erhndl/. Very little 
> has higher priority, and all the rest has lower. This setup for me is 
> insensitive to CPU graphic activities.
>
>
>
> Of course if in your case the i915 driver happens to have a higher 
> priority than the one you can manage to obtain programmatically for 
> your tasks, then you're out of luck.
>
> Hope that it helps,
>
> Giuliano
>
>
> -- 
> Do not do to others as you would have them do to you.They might have different tastes.

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

* Re: intel j1900 and i915 realtime problems
  2019-05-22 12:10 intel j1900 and i915 realtime problems Stéphane Ancelot
       [not found] ` <f1670f5a-6a78-634b-914a-cb26e2ce74aa@fastwebnet.it>
@ 2019-05-31 16:51 ` Giuliano Colla
  2019-05-31 16:56   ` Giuliano Colla
  1 sibling, 1 reply; 4+ messages in thread
From: Giuliano Colla @ 2019-05-31 16:51 UTC (permalink / raw)
  To: Stéphane Ancelot, linux-rt-users

Il 22/05/2019 14:10, Stéphane Ancelot ha scritto:
> Hi,
>
> I have got a problem with a celeron j1900 platform and i915 driver.
>
> I have 3 realtime tasks that are launched sequentially.
>
> task1 is clocked periodically at 3ms.
>
> task1 wakes up task2 and takes 2 wakes up task 3 using priority 
> scheduling (and SCHED_FIFO mechanism).
>
> everything works well, until I am using graphic applications with 
> activity (hide/show gui programs...,widgets creation /refresh etc).
>
> The task1 always start periodically each 3ms, but the other threads 
> execution time are delayed.
>
> I mean normally, the whole computing processing timing 
> (task1+task2+task3) takes normally around 800us time execution.
>
> When I stress the graphic pages, This time becomes up to 1.6ms.
>
> The 3 tasks are isolated on a cpu. I don't think the problem is 
> involved by the CPU, but more by i915 driver and memory.
>
> I have not managed to identify the right reason with perf utility.
>
> One thing I am sure :
>
> if I run the same gui pages through an ssh shell, the problem has not 
> appeared. realtime is not "broken"
>
> I know that the intel driver is involved.
>
> I would need some help to identify the right problem and for finding 
> solutions.ideas.
>
> Regards,
>

What priorities you have given to your RT tasks?

I have experienced that running on an isolated CPU is not enough to 
ensure that the scheduling of your tasks is not influenced by other 
activities. In order to have my RT tasks running properly, I've been 
forced not only to set policy to SCHED_FIFO, but also to set a priority 
as high as possible, sort of:

       mysched.sched_priority = 99;
         if( sched_setscheduler( 0, policy, &mysched ) == -1 ) {
	......

for the first task, and slghtly lower priorities to the others.

Then with *top *you may see where are positioned your tasks in the 
scheduler priority.

Here's a snapshot of Top output (sorted by priority), with my 15 RT 
tasks being, in order of priority, /ymain/ to /erhndl/. Very little has 
higher priority, and all the rest has lower. This setup for me is 
insensitive to CPU graphic activities.



Of course if in your case the i915 driver happens to have a higher 
priority than the one you can manage to obtain programmatically for your 
tasks, then you're out of luck.

Hope that it helps,

Giuliano


-- 
Do not do to others as you would have them do to you.They might have different tastes.


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

* Re: intel j1900 and i915 realtime problems
  2019-05-31 16:51 ` Giuliano Colla
@ 2019-05-31 16:56   ` Giuliano Colla
  0 siblings, 0 replies; 4+ messages in thread
From: Giuliano Colla @ 2019-05-31 16:56 UTC (permalink / raw)
  To: Stéphane Ancelot, linux-rt-users

Sorry guys for having posted again. It's an hiccup of my mail client!

-- 
Do not do to others as you would have them do to you.They might have different tastes.


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

end of thread, other threads:[~2019-05-31 16:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 12:10 intel j1900 and i915 realtime problems Stéphane Ancelot
     [not found] ` <f1670f5a-6a78-634b-914a-cb26e2ce74aa@fastwebnet.it>
2019-05-24  8:38   ` Stéphane Ancelot
2019-05-31 16:51 ` Giuliano Colla
2019-05-31 16:56   ` Giuliano Colla

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.