All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: "PRADHAN, MAKARAND (RC-CA)" <makarand.pradhan@siemens.com>,
	"Xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Interrupt latency close to 1ms on powerpc Xenomai 2.6.4
Date: Wed, 7 Oct 2015 20:47:10 +0200	[thread overview]
Message-ID: <561568AE.30109@xenomai.org> (raw)
In-Reply-To: <B89CCBE86D4F62448EE4F6367C6D3C89221EA9F2@USMLVA0EM24MSX.ww017.siemens.net>

On 10/07/2015 04:25 PM, PRADHAN, MAKARAND (RC-CA) wrote:
> Hi All,
> 
> On further experimentation, I still feel that rt_intr_enable may be causing my user space int handler to jump into secondary domain.
> 

rt_intr_enable() is a secondary domain call, it cannot execute over the
primary domain simply because the infrastructure shared with the regular
kernel that might be involved to enable/disable IRQs requires this. The
nucleus forcibly relaxes the calling thread for this reason. So the
behavior you observe is not a bug, it is actually the intent and
requirement for carrying out such request. Check
ksrc/native/syscall.c:4152, this call is tagged as "lostage", meaning
that it shall run from the lowest pipeline domain stage, i.e. linux.

This is the reason why handling interrupt top-halves in userland is a
bad idea, and also the reason why the RT_INTR support has completely
disappeared from 3.x's Alchemy API (formerly know as 2.x's "native"
API), in favor of a UIO-like model called UDD, standing for "user-space
device driver". There, top-halves must live in kernel space, and
bottom-halves may live in userland, which is the only sane and safe way
to handle interrupts from the latter.

The rationale for this change is stated here:
http://xenomai.org/migrating-from-xenomai-2-x-to-3-x/#irqhandling

-- 
Philippe.


  reply	other threads:[~2015-10-07 18:47 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 15:35 [Xenomai] Interrupt latency close to 1ms on powerpc Xenomai 2.6.4 PRADHAN, MAKARAND (RC-CA)
2015-09-29 15:50 ` Philippe Gerum
2015-09-29 16:04   ` PRADHAN, MAKARAND (RC-CA)
2015-09-29 16:15     ` Philippe Gerum
2015-09-29 17:14       ` PRADHAN, MAKARAND (RC-CA)
2015-10-02 18:30         ` PRADHAN, MAKARAND (RC-CA)
2015-10-02 20:23           ` PRADHAN, MAKARAND (RC-CA)
2015-10-07 14:25             ` PRADHAN, MAKARAND (RC-CA)
2015-10-07 18:47               ` Philippe Gerum [this message]
2015-10-07 18:55                 ` Philippe Gerum
2015-10-07 19:27                   ` PRADHAN, MAKARAND (RC-CA)
2015-10-07 19:32                     ` Lennart Sorensen
2015-10-08  6:50                     ` Philippe Gerum
2015-10-08 14:43                       ` Lennart Sorensen
2015-10-08 14:52                         ` Gilles Chanteperdrix
2015-10-08 15:15                           ` Lennart Sorensen
2015-10-08 20:19                             ` Lennart Sorensen
2015-10-08 20:27                               ` Gilles Chanteperdrix
2015-10-08 20:30                                 ` Lennart Sorensen
2015-10-08 20:31                               ` Gilles Chanteperdrix
2015-10-08 20:41                                 ` Lennart Sorensen
2015-10-08 14:54                         ` Philippe Gerum
2015-10-08 15:05                           ` PRADHAN, MAKARAND (RC-CA)
2015-10-08 15:17                           ` Lennart Sorensen
2015-10-08 15:41                             ` Philippe Gerum
2015-10-08 15:47                               ` Gilles Chanteperdrix
2015-10-08 17:34                                 ` Philippe Gerum
2015-10-08 15:51                               ` Lennart Sorensen

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=561568AE.30109@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=makarand.pradhan@siemens.com \
    --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.