All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Dmitry Adamushko <dmitry.adamushko@domain.hid>
Cc: xenomai@xenomai.org
Subject: [Xenomai-core] Re: [Xenomai-help] rt_task_wait_period() and overruns
Date: Fri, 03 Mar 2006 12:29:01 +0100	[thread overview]
Message-ID: <4408287D.7040004@domain.hid> (raw)
In-Reply-To: <b647ffbd0603011101p1247cd87t@domain.hid>

Dmitry Adamushko wrote:
> 
> On 01/03/06, *Philippe Gerum* <rpm@xenomai.org <mailto:rpm@xenomai.org>> 
> wrote:
> 
>     Dmitry Adamushko wrote:
>      >
>      > On 01/03/06, *Philippe Gerum* <rpm@xenomai.org
>     <mailto:rpm@xenomai.org> <mailto:rpm@xenomai.org
>     <mailto:rpm@xenomai.org>>>
>      > wrote:
>      >
>      >
>      >      The other option I've described for
>      >     dealing with overruns in rt_task_wait_period would be as follows:
>      >
>      >     - save the count of overruns
>      >     - clear the count of overruns  /* i.e. "purge" */
>      >     - return both the saved count and -ETIMEDOUT to the user.
>      >
>      >     This way, rt_task_wait_period would return only once with an
>     error
>      >     status, telling
>      >     the user about the exact count of pending overruns in the
>     same time.
>      >
>      >
>      >
>      > I definitely agree with you here.
>      >
>      > IMHO, there is no point in calling rt_task_wait_period() a few
>      > times in a row just to clean up the "poverrun" counter
>      > (if there were a few overruns) when the whole may be reported at
>     once.
>      > This former way just gives unnecessary overhead.
>      >
> 
>     My concern is that some recovery procedure might require to get the
>     exact number
>     of pending overruns to operate properly in order to catch up with
>     the missing
>     expiries, and there is no way to get this information out of the
>     current API (!).
>     Even calling rt_task_wait_period in loop and testing for -ETIMEDOUT
>     is unusable,
>     since well, we would obviously get blocked when the overrun count
>     drops to zero,
>     which is not what we want in order to be able to run the recovery
>     procedure asap.
> 
> 
> All in all, I would vote for changing the current rt_task_wait_period() 
> interface.

I'm convinced now that this is the way to go too, because the current interface is 
not only limited, but broken, since it does not allow to tell the recovery 
procedure the exact count of pending overruns.

This is a widely used routine unfortunately, so the change won't go unnoticed, but 
on the other hand, v2.1 is likely the last opportunity we have to clean the native 
API from legacy issues, without resorting to using weird hacks aimed at keeping 
the binary and source compatibilities, many of which end up polluting the API they 
are supposed to protect.

>  
> 
> 
>      >
>      > Actually, there is a kind of application that must not rely on
>      > the "poverrun" counter, the klatency/latency utility and alike.
>      >
>      > They are run normally (at least at the very first time) in the
>     untrusted
>      > environment
>      > where SMI or something similar - that may prevent a CPU from
>     handling normal
>      > interrupts for quite a long time - make occur happily.
>      > As the "poeverrun" counting is dependent on the timer interrupt,
>      > it becomes irrelevant.
>      >
>      > Something like
>      > overruns = (real_time_of_wakeup - desired_time_of_wakeup) /
>     period (*)
>      > should be rather used there (of course, the timing source must not be
>      > interrupt-dependent).
> 
>     Ah! you know what, I'm pretty sure that one of your very first
>     public posts on the
>     RTAI/fusion mailing list at that time, was exactely about this issue
>     :o) 
> 
> 
> Good memory indeed; so it's too earlier for you to get retired :o)
>  

"G3" still means "inspired guitar masters" to me, and not some obscure powerpc 
thingy, so I guess that I've not been spoiled by IT yet. Way too early to retire then.

> 
>     --
> 
>     Philippe.
> 
> 
> 
> 
> -- 
> Best regards,
> Dmitry Adamushko


-- 

Philippe.


  reply	other threads:[~2006-03-03 11:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27 14:20 [Xenomai-help] resume/suspend periodic timing issue Steven Seeger
2006-02-27 18:39 ` Gilles Chanteperdrix
2006-02-28 13:45   ` Steven Seeger
2006-02-28 13:55     ` Gilles Chanteperdrix
2006-02-28 14:07       ` Steven Seeger
2006-02-28 14:21         ` Jan Kiszka
2006-02-28 14:24           ` Steven Seeger
2006-02-28 15:10             ` Philippe Gerum
2006-02-28 15:13               ` Steven Seeger
2006-02-28 15:27                 ` Jan Kiszka
2006-02-28 15:29                   ` Steven Seeger
2006-02-28 15:43                     ` Jan Kiszka
2006-02-28 15:46                       ` Steven Seeger
2006-02-28 16:01                         ` Jan Kiszka
2006-02-28 16:27                           ` Steven Seeger
2006-02-28 15:29                 ` Philippe Gerum
2006-02-28 15:31                   ` Steven Seeger
2006-02-28 16:20                     ` Philippe Gerum
2006-02-28 16:28                       ` Steven Seeger
2006-02-28 16:37                         ` Philippe Gerum
2006-02-28 17:24                           ` Steven Seeger
2006-02-28 17:53                             ` [Xenomai-core] rt_task_wait_period() and overruns Philippe Gerum
2006-02-28 18:02                               ` [Xenomai-core] Re: [Xenomai-help] " Philippe Gerum
2006-02-28 18:15                               ` Steven Seeger
2006-03-01 10:22                                 ` Philippe Gerum
2006-03-01 15:25                                   ` Dmitry Adamushko
2006-03-01 16:00                                     ` Philippe Gerum
2006-03-01 19:01                                       ` Dmitry Adamushko
2006-03-03 11:29                                         ` Philippe Gerum [this message]
2006-02-28 13:57     ` [Xenomai-help] resume/suspend periodic timing issue Philippe Gerum

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=4408287D.7040004@domain.hid \
    --to=rpm@xenomai.org \
    --cc=dmitry.adamushko@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.