All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: rpm@xenomai.org
Cc: mathias_koehrer@domain.hid, xenomai@xenomai.org
Subject: Re: [Xenomai-core] [Xenomai-help] Sporadic PC freeze after	rt_task_start
Date: Fri, 20 Jul 2007 16:20:38 +0200	[thread overview]
Message-ID: <46A0C4B6.5070706@domain.hid> (raw)
In-Reply-To: <1184880955.28303.235.camel@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 2471 bytes --]

Philippe Gerum wrote:
...
> Read my mail, without listening to your own grumble at the same time,
> you should see that this is not a matter of being right or wrong, it is
> a matter of who needs what, and how one will use Xenomai. Your grumble
> does not prove anything unfortunately, otherwise everything would be
> fixed since many moons.

Why things are unfixed has something to do with their complexity. RPI is
a complex thing AND it is a separate mechanism to the core (that's why I
was suggesting to reuse PI code if possible - something that is already
integrated for many moons).

> What I'm suggesting now, so that you can't tell the rest of the world
> that I'm such an old and deaf cranky meatball, is that we do place RPI
> under strict observation until the latest 2.4-rc is out, and we would
> decide at this point whether we should change the default value for the
> skins for which it makes sense (both for v2.3.x and 2.4). Obviously,
> this would only make sense if key users actually give hell to the 2.4
> testing releases (Mathias, the world is watching you).

OK, let's go through this another time, this time under the motto "get
the locking right". As a start (and a help for myself), here comes an
overview of the scheme the final version may expose - as long as there
are separate locks:

gatekeeper_thread / xnshadow_relax:
	rpilock, followed by nklock
	(while xnshadow_relax puts both under irqsave...)

xnshadow_unmap:
	nklock, then rpilock nested

xnshadow_start:
	rpilock, followed by nklock

xnshadow_renice:
	nklock, then rpilock nested

schedule_event:
	only rpilock

setsched_event:
	nklock, followed by rpilock, followed by nklock again

And then there is xnshadow_rpi_check which has to be fixed to:
	nklock, followed by rpilock (here was our lock-up bug)

That's a scheme which /should/ be safe. Unfortunately, I see no way to
get rid of the remaining nestings.

And I still doubt we are gaining much by the lock split-up on SMP (it's
pointless for UP due to xnshadow_relax). In case there is heavy
migration activity on multiple cores/CPUs, we now regularly content for
two locks in the hot paths instead of just the one everyone has to go
through anyway. And while we obviously don't win a dime for the worst
case, the average reduction of spinning times trades off against more
atomic (cache-line bouncing) operations. Were you able to measure some
improvement?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2007-07-20 14:20 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10  8:00 [Xenomai-help] Sporadic PC freeze after rt_task_start M. Koehrer
2007-07-10  8:40 ` Jan Kiszka
2007-07-10 12:29   ` M. Koehrer
2007-07-10 12:41     ` Jan Kiszka
2007-07-10 14:40       ` M. Koehrer
2007-07-10 15:34         ` Jan Kiszka
2007-07-11  6:43           ` M. Koehrer
2007-07-11  7:32             ` Jan Kiszka
2007-07-11 12:45               ` M. Koehrer
2007-07-11 14:47           ` Jan Kiszka
2007-07-13  7:27             ` M. Koehrer
2007-07-13  8:26               ` Jan Kiszka
2007-07-16  7:07                 ` M. Koehrer
2007-07-16 22:42                   ` Jan Kiszka
2007-07-19 10:58                     ` M. Koehrer
2007-07-19 11:27                       ` Jan Kiszka
2007-07-19 12:19                         ` Philippe Gerum
2007-07-19 12:40                           ` Jan Kiszka
2007-07-19 13:55                             ` [Xenomai-core] " Philippe Gerum
2007-07-19 15:14                             ` Philippe Gerum
2007-07-19 15:35                               ` Jan Kiszka
2007-07-19 16:03                                 ` Philippe Gerum
2007-07-19 17:18                                   ` Jan Kiszka
2007-07-19 18:24                                     ` Philippe Gerum
2007-07-19 20:15                                       ` Jan Kiszka
2007-07-19 21:35                                         ` Philippe Gerum
2007-07-20 14:20                                           ` Jan Kiszka [this message]
2007-07-20 18:33                                             ` Philippe Gerum
2007-07-21  8:49                                             ` Philippe Gerum
2007-07-22 16:44                                               ` Jan Kiszka
2007-07-19 17:57                                   ` Jan Kiszka
2007-07-21 20:15                                     ` Philippe Gerum
2007-07-20  7:03                               ` M. Koehrer

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=46A0C4B6.5070706@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=mathias_koehrer@domain.hid \
    --cc=rpm@xenomai.org \
    --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.