All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giuliano Colla <giuliano.colla@fastwebnet.it>
To: "Stéphane Ancelot" <sancelot@numalliance.com>,
	linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: intel j1900 and i915 realtime problems
Date: Fri, 31 May 2019 18:51:16 +0200	[thread overview]
Message-ID: <e8b5ac8d-2ff1-791f-98da-4f4854676873@fastwebnet.it> (raw)
In-Reply-To: <bf7df0b0-64b4-910f-137e-1eba406d3f52@numalliance.com>

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.


  parent reply	other threads:[~2019-05-31 16:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-05-31 16:56   ` Giuliano Colla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8b5ac8d-2ff1-791f-98da-4f4854676873@fastwebnet.it \
    --to=giuliano.colla@fastwebnet.it \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=sancelot@numalliance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.