All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jonathan ILIAS-PILLET <ismael@domain.hid>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Program hangs using "rt_task_sleep" in a particular way
Date: Mon, 07 Mar 2011 15:33:50 +0100	[thread overview]
Message-ID: <4D74ECCE.3080001@domain.hid> (raw)
In-Reply-To: <AANLkTinnCqCNrJ-tukjxGd-zdtM9nuG2fw4Zer+iTSiQ@mail.gmail.com>

Jonathan ILIAS-PILLET wrote:
> 2011/3/7 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
>> We do not know anything about your setup (except the platform). See:
>> http://www.xenomai.org/index.php/Request_for_information
> 
> Oh, sorry. Here it is :
> - linux kernel : 2.6.29.6
> - adeos patch : adeos-ipipe-2.6.29-arm-1.13-00.patch
> - xenomai : 2.4.8
> - host linux distribution : ubuntu 10.04 (64 bits)
> - compiler : gcc 4.2.1 (buildroot's generated toolchain)
> 
> For those who knows it, all of this comes from Armadeus distribution
> (vendor package for the board we use) in version 3.3 which is based on
> buildroot (see http://www.armadeus.com/wiki/).

This is very old stuff. Could you try whether you reproduce this issue
with Xenomai latest release (2.5.5.2) ? Also, using 2.4.8 is
preposterous, you should at least upgrade to the latest release from the
same branch, it should be 2.4.9.1.

> 
>> It would also be interesting to know if you have root thread priority
>> coupling enabled.
> 
> Actually, I've never choose any option about this, I thought it was
> activated by default. Perhaps I messed the kernel configuration
> related to this, where this feature can be enabled or disabled ?
> 
> According to http://www.xenomai.org/index.php/Proc/xenomai/sched, I
> guess it is enabled :
> # cat /proc/xenomai/sched
> CPU  PID    PRI      PERIOD     TIMEOUT    TIMEBASE  STAT       NAME
>   0  0       -1      0          0          master    R          ROOT

No, you do not see anything here. You have to check the kernel
configuration.

Relying on someone else's configuration will not fly for long, you have
to know what is in the kernel you compile.

> 
> 
>> In any case, your real-time tasks should never use all the cpu without
>> letting Linux run. The only way to guarantee the stability of the system
>> is by letting Linux run from time to time.
> 
> OK, I understand. Linux kernel is time dependant (at least for the
> scheduler). But is there a specific reason for this or is it a general
> precaution ?
> 
> When you say "time to time", is there any rule to follow to be sure
> that enough time is given to Linux ? Something like CPU cannot spend
> more than 500 ms in one second for primary mode threads ?

No. Something like your application should release the cpu once every
10ms so that Linux receives its ticks when it expects them (so, every
1ms if running at 1000 Hz). In fact, a typical application is blocked
most of the time and only reacts to events (be it the timer interrupt).

-- 
					    Gilles.


  parent reply	other threads:[~2011-03-07 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07  9:18 [Xenomai-help] Program hangs using "rt_task_sleep" in a particular way Jonathan ILIAS-PILLET
2011-03-07 10:15 ` Gilles Chanteperdrix
2011-03-07 14:29   ` Jonathan ILIAS-PILLET
     [not found]   ` <AANLkTinnCqCNrJ-tukjxGd-zdtM9nuG2fw4Zer+iTSiQ@mail.gmail.com>
2011-03-07 14:33     ` Gilles Chanteperdrix [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-06-27  6:31 Adrien LEMAITRE
2011-06-27 10:53 ` Gilles Chanteperdrix
     [not found]   ` <BANLkTimCab2u0EOrJ6JtLTVLNAzktbvFQg@domain.hid>
2011-06-28 13:08     ` Gilles Chanteperdrix
2011-06-28 14:02       ` Adrien LEMAITRE
2011-06-28 15:08         ` Gilles Chanteperdrix

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=4D74ECCE.3080001@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=ismael@domain.hid \
    --cc=xenomai@xenomai.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 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.