All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: rpm@xenomai.org
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] xnshadow_relax in taskexit_event
Date: Mon, 09 Mar 2009 10:39:12 +0100	[thread overview]
Message-ID: <49B4E3C0.6030804@domain.hid> (raw)
In-Reply-To: <49B4E225.5080401@domain.hid>

Philippe Gerum wrote:
> Jan Kiszka wrote:
>> Philippe Gerum wrote:
>>> Jan Kiszka wrote:
>>>> Hi,
>>>>
>>>> this looks suspicious to me:
>>>>
>>>> static inline void do_taskexit_event(struct task_struct *p)
>>>> {
>>>>     ...
>>>>     if (xnpod_shadow_p())
>>>>         xnshadow_relax(0);
>>>>
>>>> A) The only call context of this hook is do_exit() - and that's Linux
>>>> kernel code which should always run in secondary mode, no?
>>>>
>>> It is a left-over from the days when do_exit() could be called from
>>> primary context directly on behalf on the shadow unmapping code; now
>>> we go through an APC, so that should be ok.
>>
>> Mmm, then I wonder if we shouldn't be able to drop the explicit
>> xnpod_schedule() from do_taskexit_event() as well: we always enter this
>> code over the ROOT thread, and xnpod_delete_thread() will only kill a
>> suspended thread. So there should be no need to reschedule afterwards.
>> Will post an updated patch.
>>
> 
> Nak, the deletion hook may alter the scheduling state.

OK. Is such a hook expected to call xnsched_set_resched in that case,
ie. can we drop it?

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux


  reply	other threads:[~2009-03-09  9:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-08 10:28 [Xenomai-core] xnshadow_relax in taskexit_event Jan Kiszka
2009-03-08 11:03 ` Philippe Gerum
2009-03-09  9:19   ` Jan Kiszka
2009-03-09  9:32     ` Philippe Gerum
2009-03-09  9:39       ` Jan Kiszka [this message]
2009-03-09 10:16         ` 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=49B4E3C0.6030804@domain.hid \
    --to=jan.kiszka@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.