From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Wolfgang Netbal <wolfgang.netbal@sigmatek.at>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Performance impact after switching from 2.6.2.1 to 2.6.4
Date: Tue, 7 Jun 2016 19:00:50 +0200 [thread overview]
Message-ID: <20160607170050.GA13922@hermes.click-hack.org> (raw)
In-Reply-To: <5756D673.4080408@sigmatek.at>
On Tue, Jun 07, 2016 at 04:13:07PM +0200, Wolfgang Netbal wrote:
>
>
> Am 2016-06-06 um 17:35 schrieb Gilles Chanteperdrix:
> > On Mon, Jun 06, 2016 at 09:03:40AM +0200, Wolfgang Netbal wrote:
> >>
> >> Am 2016-06-02 um 10:23 schrieb Gilles Chanteperdrix:
> >>> On Thu, Jun 02, 2016 at 10:15:41AM +0200, Wolfgang Netbal wrote:
> >>>> Am 2016-06-01 um 16:12 schrieb Gilles Chanteperdrix:
> >>>>> On Wed, Jun 01, 2016 at 03:52:06PM +0200, Wolfgang Netbal wrote:
> >>>>>> Am 2016-05-31 um 16:16 schrieb Gilles Chanteperdrix:
> >>>>>>> On Tue, May 31, 2016 at 04:09:07PM +0200, Wolfgang Netbal wrote:
> >>>>>>>> Dear all,
> >>>>>>>>
> >>>>>>>> we have moved our application from "XENOMAI 2.6.2.1 + Linux 3.0.43" to
> >>>>>>>> "XENOMAI 2.6.4. + Linux 3.10.53". Our target is an i.MX6DL. The system
> >>>>>>>> is now up and running and works stable. Unfortunately we see a
> >>>>>>>> difference in the performance. Our old combination (XENOMAI 2.6.2.1 +
> >>>>>>>> Linux 3.0.43) was slightly faster.
> >>>>>>>>
> >>>>>>>> At the moment it looks like that XENOMAI 2.6.4 calls
> >>>>>>>> xnpod_schedule_handler much more often then XENOMAI 2.6.2.1 in our old
> >>>>>>>> system. Every call of xnpod_schedule_handler interrupts our main
> >>>>>>>> XENOMAI task with priority = 95.
> As I wrote above, I get interrupts 1037 handled by rthal_apc_handler()
> and 1038 handled by xnpod_schedule_handler() while my realtime task
> is running on kernel 3.10.53 with Xenomai 2.6.4.
> On kernel 3.0.43 with Xenomai 2.6.4 there are no interrupts, except the
> once that are send by my board using GPIOs, but this virtual interrupts
> are assigned to Xenomai and Linux as well but I didn't see a handler
> installed.
> I'm pretty sure that these interrupts are slowing down my system, but
> where do they come from ?
> why didn't I see them on Kernel 3.0.43 with Xenomai 2.6.4 ?
> how long do they need to process ?
How do you mean you do not see them? If you are talking about the
rescheduling API, it used no to be bound to a virq (so, it would
have a different irq number on cortex A9, something between 0 and 31
that would not show in the usual /proc files), I wonder if 3.0 is
before or after that. You do not see them in /proc, or you see them
and their count does not increase?
As for where they come from, this is not a mystery, the reschedule
IPI is triggered when code on one cpu changes the scheduler state
(wakes up a thread for instance) on another cpu. If you want to
avoid it, do not do that. That means, do not share mutex between
threads running on different cpus, pay attention for timers to be
running on the same cpu as the thread they signal, etc...
The APC virq is used to multiplex several services, which you can
find by grepping the sources for rthal_apc_alloc:
./ksrc/skins/posix/apc.c: pse51_lostage_apc = rthal_apc_alloc("pse51_lostage_handler",
./ksrc/skins/rtdm/device.c: rtdm_apc = rthal_apc_alloc("deferred RTDM close", rtdm_apc_handler,
./ksrc/nucleus/registry.c: rthal_apc_alloc("registry_export", ®istry_proc_schedule, NULL);
./ksrc/nucleus/pipe.c: rthal_apc_alloc("pipe_wakeup", &xnpipe_wakeup_proc, NULL);
./ksrc/nucleus/shadow.c: rthal_apc_alloc("lostage_handler", &lostage_handler, NULL);
./ksrc/nucleus/select.c: xnselect_apc = rthal_apc_alloc("xnselectors_destroy",
It would be interesting to know which of these services is triggered
a lot. One possibility I see would be root thread priority
inheritance, so it would be caused by mode switches. This brings the
question: do your application have threads migrating between primary
and secondary mode, do you see the count of mode switches increase
with the kernel changes, do you have root thread priority
inheritance enabled?
--
Gilles.
https://click-hack.org
next prev parent reply other threads:[~2016-06-07 17:00 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 14:09 [Xenomai] Performance impact after switching from 2.6.2.1 to 2.6.4 Wolfgang Netbal
2016-05-31 14:16 ` Gilles Chanteperdrix
2016-06-01 13:52 ` Wolfgang Netbal
2016-06-01 14:12 ` Gilles Chanteperdrix
2016-06-02 8:15 ` Wolfgang Netbal
2016-06-02 8:23 ` Gilles Chanteperdrix
2016-06-06 7:03 ` Wolfgang Netbal
2016-06-06 15:35 ` Gilles Chanteperdrix
2016-06-07 14:13 ` Wolfgang Netbal
2016-06-07 17:00 ` Gilles Chanteperdrix [this message]
2016-06-27 15:55 ` Wolfgang Netbal
2016-06-27 16:00 ` Gilles Chanteperdrix
2016-06-28 8:08 ` Wolfgang Netbal
2016-06-27 16:46 ` Gilles Chanteperdrix
2016-06-28 8:31 ` Wolfgang Netbal
2016-06-28 8:34 ` Gilles Chanteperdrix
2016-06-28 9:15 ` Wolfgang Netbal
2016-06-28 9:17 ` Gilles Chanteperdrix
2016-06-28 9:28 ` Wolfgang Netbal
2016-06-28 9:29 ` Gilles Chanteperdrix
2016-06-28 9:51 ` Wolfgang Netbal
2016-06-28 9:55 ` Gilles Chanteperdrix
2016-06-28 10:10 ` Wolfgang Netbal
2016-06-28 10:19 ` Gilles Chanteperdrix
2016-06-28 10:31 ` Wolfgang Netbal
2016-06-28 10:39 ` Gilles Chanteperdrix
2016-06-28 11:45 ` Wolfgang Netbal
2016-06-28 11:57 ` Gilles Chanteperdrix
2016-06-28 11:55 ` Wolfgang Netbal
2016-06-28 12:01 ` Gilles Chanteperdrix
2016-06-28 14:32 ` Wolfgang Netbal
2016-06-28 14:42 ` Gilles Chanteperdrix
2016-06-30 9:17 ` Wolfgang Netbal
2016-06-30 9:39 ` Gilles Chanteperdrix
2016-06-07 17:22 ` Philippe Gerum
2016-05-31 15:08 ` 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=20160607170050.GA13922@hermes.click-hack.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=wolfgang.netbal@sigmatek.at \
--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.