From: Roger Larsson <roger.larsson@norran.net>
To: Mastoras <mastoras@hack.gr>,
rtl@rtlinux.org, linux-kernel@vger.kernel.org
Subject: Re: RTlinux & Linux Question
Date: Mon, 27 Nov 2000 18:58:03 +0100 [thread overview]
Message-ID: <00112718580301.01110@dox> (raw)
In-Reply-To: <Pine.BSF.4.21.0011270332160.9529-100000@papari.hack.gr>
In-Reply-To: <Pine.BSF.4.21.0011270332160.9529-100000@papari.hack.gr>
On Monday 27 November 2000 02:36, Mastoras wrote:
> Hello,
>
> I'm trying to use RTlinux to make a unix process wakeup
> periodicaly, in terms of "real time".
Have I understood correctly - you try to use a RTLinux process to get a
finer grained periodical wakeup than linux standard 10 ms?
>
> 1) the unix process uses 2 system calls, one to make it self periodic, and
> one to suspend its self until the next period.
>
> 2) The system call that makes the unix process periodic, creates a Rtlinux
> thread, which is periodic with the same period.
>
> 3) The periodic RT linux thread, sets a flag & sends fakes IRQ0 to linux,
> in order to force its scheduling as soon as possible and then suspends it
> self. (i know that this advances time, but this is not the question right
> now).
>
> 4) The unix process wakeups perfectely when there is no disk activity, but
> when there is some disk activity ("find /" and/or "updatedb") or the
> period is too small (300us) i noticed that sometimes it loses one or two
> periods. This is very rare, i mean 14 loses in 5000 executions at 5ms
> period.
>
> 5) The unix process isn't scheduled the appropriate time although that
> every IRQ is received by linux correctly, the myprocess->counter is
> initialized to a very high value (in each period) and
> current->need_resched is set to 1.
>
You have been hit by the kernel latency, see
http://www.gardena.net/benno/linux/audio
(There are patches)
> 6) I don't want to use PSC.
All attempts to guarantee wake up of a linux process within any
time frame will fail.
Applying a low latency kernel patch will help - good enough for many
applications, but no guarantees...
To get guarantees you need to do your stuff in a RTLinux thread.
(and why not, you are already using it?)
/RogerL
--
Home page:
http://www.norran.net/nra02596/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
prev parent reply other threads:[~2000-11-27 18:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-27 1:36 RTlinux & Linux Question Mastoras
2000-11-27 17:58 ` Roger Larsson [this message]
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=00112718580301.01110@dox \
--to=roger.larsson@norran.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mastoras@hack.gr \
--cc=rtl@rtlinux.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