linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ran Shalit <ranshalit@gmail.com>
To: Daniel Wagner <wagi@monom.org>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: How to investigate different timings of 2 HW with same kernel ?
Date: Fri, 18 May 2018 12:42:28 +0300	[thread overview]
Message-ID: <CAJ2oMh+tCSVT9mHkEzDP25FdwgBKkLCx3oLnkq+9ch6wpk1nhA@mail.gmail.com> (raw)
In-Reply-To: <893c67d2-576d-7033-53dc-85daa5379b73@monom.org>

On Fri, May 18, 2018 at 9:53 AM, Daniel Wagner <wagi@monom.org> wrote:
> Hi Ran,
>
>> Testing is done using:
>> https://github.com/nma/preempt-rt/blob/master/test-rt.c
>
>
> I just noticed this:
>
> #define MY_PRIORITY (49) /* we use 49 as the PRREMPT_RT use 50
>                             as the priority of kernel tasklets
>                             and interrupt handler by default */
>
> ...
>         param.sched_priority = MY_PRIORITY;
>         if(sched_setscheduler(0, SCHED_FIFO, &param) == -1) {
>                 perror("sched_setscheduler failed");
>                 exit(-1);
>         }
> ...
>
> The man page on sched_setscheduler:
>
>        SCHED_FIFO    a first-in, first-out policy; and
>        SCHED_RR      a round-robin policy.
>
>        For each of the above policies, param->sched_priority specifies
>        a scheduling priority for the thread.  This is a number in the
>        range  returned  by calling  sched_get_priority_min(2)  and
>        sched_get_priority_max(2) with the specified policy.  On Linux,
>        these system calls return, respectively, 1 and 99.
>
> Thus you should pick a priority higher then the default IRQ thread
> priorities, e.g. 51 should do the trick.


That's interesting.
I've assumed that the test founded in git is a good tool for testing
the real-time.
If this is the case, it probably means that is using a more standard
tool for rt-test like  cyclictest, would have been better.
Anyway, I will try your suggestion.
If it shows improvement than it probably mean that in that board
(portwell) there is some high IRQ inputs from some input device.
Anyway, after checking as you suggested, I'll have more information.

Thank you,
Ran

>
> Thanks,
> Daniel

  reply	other threads:[~2018-05-18  9:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 14:41 How to investigate different timings of 2 HW with same kernel ? Ran Shalit
2018-05-18  6:53 ` Daniel Wagner
2018-05-18  9:42   ` Ran Shalit [this message]
2018-05-23 10:40     ` Daniel Wagner

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=CAJ2oMh+tCSVT9mHkEzDP25FdwgBKkLCx3oLnkq+9ch6wpk1nhA@mail.gmail.com \
    --to=ranshalit@gmail.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=wagi@monom.org \
    /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 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).