All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: grugh@domain.hid, xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] [RFC] non-RT-safe rtdm_event_*wait
Date: Mon, 22 May 2006 12:09:08 +0200	[thread overview]
Message-ID: <44718DC4.10009@domain.hid> (raw)
In-Reply-To: <44716DC0.7080709@domain.hid>

Jan Kiszka wrote:
> Philippe Gerum wrote:
> 
>>Given that, a shadow thread which remains in secondary mode is seen as
>>suspended by the Xenomai scheduler, which means that the additional
>>overhead is close to nil (aside of an additional shadow tcb), until it
>>tries to grab the resource and thus moves to the primary domain, just
>>for going to sleep.
> 
> 
> I'm not concerned about a passive shadow, my aim is to reduce the impact
> of active shadow threads without strict timing requirements. When there
> is a larger number of them, they should not influence RT scheduling
> significantly for just being woken up.
> 

This issue already exists now, since interrupts are off when Linux 
performs a context switch, so that we can't wreck the whole thing by 
allowing a shadow to preempt it in the middle of the mm switch. Since 
non-RT shadow would run at priority level 0, my feeling is that it would 
not change the current situation, except perhaps on SMP where the nklock 
would be held a little more.

> The other point might be the code path length of both non-RT wakeup
> suspend/wakeup mechanisms. It's only an assessment, but I think this way
> would be shorter. Anyway, numbers would speak clearer, and I guess this
> should be done first before any further design decision.
> 

Agreed.

> 
>>IOW, I would rather use the allow-non-SCHED_FIFO-shadow patch to allow
>>regular Linux tasks to pend seamlessly on Xenomai sync objects as true
>>shadows, and add to the rtdm blocking syscall handler some code that
>>would transparently promote any calling regular task as a Xenomai shadow
>>on the fly, before undergoing the request. The other advantage of such
>>approach is that the non-RT pending task is still known from the Xenomai
>>sub-system (/proc/xenomai/ interface and so on), which may be useful
>>given that it interacts with it. You could still apply a FIFO pending
>>order with mixed RT and non-RT tasks the same way.
> 
> 
> Hmm, on-demand shadowing might be an option. Ok, once non-SCHED_FIFO is
> merged, we should have a look at both approaches from the performance
> POV and compare potential differences with the required additional code.
> 
> 
>>Moving RTDM to native preemption would also be simpler, since RTDM would
>>expect the issue to be handled at core level directly, and in the
>>preempt-rt case, the issue of the caller's domain is actually a non-issue.
>>
> 
> 
> Well, this is already the case for my proposal: no special handling of
> rtdm_event_* depending on the caller's context anymore.
> 

But still, you have to change RTDM's code do implement that, more than 
you would have to do in promoting a regular task as a non-RT shadow.

> Jan
> 


-- 

Philippe.


      reply	other threads:[~2006-05-22 10:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-18  7:46 [Xenomai-core] [RFC] non-RT-safe rtdm_event_*wait Jan Kiszka
2006-05-20 12:21 ` Philippe Gerum
2006-05-22  7:52   ` Jan Kiszka
2006-05-22 10:09     ` Philippe Gerum [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=44718DC4.10009@domain.hid \
    --to=rpm@xenomai.org \
    --cc=grugh@domain.hid \
    --cc=jan.kiszka@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.