All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: rpm@xenomai.org
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] High latencies on ARM.
Date: Sat, 26 Jan 2008 19:43:23 +0100	[thread overview]
Message-ID: <18331.32587.725949.407764@domain.hid> (raw)
In-Reply-To: <479B7938.2000206@domain.hid>

Philippe Gerum wrote:
 > Gilles Chanteperdrix wrote:
 > > On Jan 23, 2008 7:34 PM, Philippe Gerum <rpm@xenomai.org> wrote:
 > >> Gilles Chanteperdrix wrote:
 > >>> On Jan 23, 2008 6:48 PM, Philippe Gerum <rpm@xenomai.org> wrote:
 > >>>> Gilles Chanteperdrix wrote:
 > >>>>> Gilles Chanteperdrix wrote:
 > >>>>>  > Please find attached a patch implementing these ideas. This adds some
 > >>>>>  > clutter, which I would be happy to reduce. Better ideas are welcome.
 > >>>>>  >
 > >>>>>
 > >>>>> Ok. New version of the patch, this time split in two parts, should
 > >>>>> hopefully make it more readable.
 > >>>>>
 > >>>> Ack. I'd suggest the following:
 > >>>>
 > >>>> - let's have a rate limiter when walking the zombie queue in
 > >>>> __xnpod_finalize_zombies. We hold the superlock here, and what the patch
 > >>>> also introduces is the potential for flushing more than a single TCB at
 > >>>> a time, which might not always be a cheap operation, depending on which
 > >>>> cra^H^Hode runs on behalf of the deletion hooks for instance. We may
 > >>>> take for granted that no sane code would continuously create more
 > >>>> threads than we would be able to finalize in a given time frame anyway.
 > >>> The maximum number of zombies in the queue is
 > >>> 1 + XNARCH_WANT_UNLOCKED_CTXSW, since a zombie is added to the queue
 > >>> only if a deleted thread is xnpod_current_thread(), or if the XNLOCKSW
 > >>> bit is armed.
 > >> Ack. rate_limit = 1? I'm really reluctant to increase the WCET here,
 > >> thread deletion isn't cheap already.
 > > 
 > > I am not sure that holding the nklock while we run the thread deletion
 > > hooks is really needed.
 > > 
 > 
 > Deletion hooks may currently rely on the following assumptions when running:
 > 
 > - rescheduling is locked
 > - nklock is held, interrupts are off
 > - they run on behalf of the deletor context
 > 
 > The self-delete refactoring currently kills #3 because we now run the
 > hooks after the context switch, and would also kill #2 if we did not
 > hold the nklock (btw, enabling the nucleus debug while running with this
 > patch should raise an abort, from xnshadow_unmap, due to the second
 > assertion).
 > 
 > It should be possible to get rid of #3 for xnshadow_unmap (serious
 > testing needed here), but we would have to grab the nklock from this
 > routine anyway.

Since the unmapped task is no longer running on the current CPU, is no
there any chance that it is run on another CPU by the time we get to
xnshadow_unmap ?

-- 


					    Gilles Chanteperdrix.


  reply	other threads:[~2008-01-26 18:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-02 10:31 [Xenomai-core] High latencies on ARM Gilles Chanteperdrix
2008-01-17 10:42 ` Jan Kiszka
2008-01-17 10:47   ` Gilles Chanteperdrix
2008-01-17 11:55     ` Jan Kiszka
2008-01-17 13:59       ` Gilles Chanteperdrix
2008-01-17 14:16         ` Jan Kiszka
2008-01-17 14:18           ` Jan Kiszka
2008-01-17 14:20           ` Gilles Chanteperdrix
2008-01-17 14:22             ` Jan Kiszka
2008-01-17 15:37               ` Gilles Chanteperdrix
2008-01-31  7:43                 ` Gilles Chanteperdrix
2008-01-21 21:55               ` Gilles Chanteperdrix
2008-01-22 20:36 ` Gilles Chanteperdrix
2008-01-22 21:46   ` Jan Kiszka
2008-01-22 22:13     ` Gilles Chanteperdrix
2008-01-22 22:22     ` Gilles Chanteperdrix
     [not found] ` <18315.63245.160672.547658@domain.hid>
2008-01-22 20:36   ` Gilles Chanteperdrix
2008-01-23 17:48     ` Philippe Gerum
2008-01-23 17:53       ` Gilles Chanteperdrix
2008-01-23 18:34         ` Philippe Gerum
2008-01-23 18:39           ` Gilles Chanteperdrix
2008-01-23 22:38           ` Gilles Chanteperdrix
2008-01-24 10:18           ` Gilles Chanteperdrix
2008-01-26 18:17             ` Philippe Gerum
2008-01-26 18:43               ` Gilles Chanteperdrix [this message]
2008-01-27  0:19                 ` Philippe Gerum
     [not found]                   ` <18333.3277.36164.63798@domain.hid>
2008-01-27 23:34                     ` Philippe Gerum
2008-01-28 11:02                       ` Gilles Chanteperdrix
2008-01-28 12:18                         ` 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=18331.32587.725949.407764@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --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.