From: Marco Stornelli <marco.stornelli@gmail.com>
To: Michael Schnell <mschnell@lumino.de>
Cc: Robert Schwebel <r.schwebel@pengutronix.de>,
linux-embedded@vger.kernel.org
Subject: Re: AMP on an SMP system
Date: Fri, 02 Aug 2013 16:53:50 +0200 [thread overview]
Message-ID: <51FBC7FE.4000403@gmail.com> (raw)
In-Reply-To: <51FBA261.10301@lumino.de>
Il 02/08/2013 14:13, Michael Schnell ha scritto:
> On 08/02/2013 01:42 PM, Robert Schwebel wrote:
>> Before hacking around (which might also lead to interesting solutions),
>> I would start using a kernel with preempt-rt support and play with the
>> cpu affinity:
>>
>> http://lxr.linux.no/#linux+v3.10.4/Documentation/kernel-parameters.txt#L1257
>>
>>
>
> Robert !
> Nice to see you here (I do own your "Embedded Linux Handbuch für
> Entwickler" :-) )
>
> Thanks for the pointer !
>
> I do already know "preempt-rt", but I was not aware of cpu affinity.
>
> So this might help.
>
> In fact I need a way to do very guaranteed low latency. regarding the
> high clock rate (about 1 GHz) modern ARM chips can provide, maybe
> preempt-rt with the cpu affinity might be a decent way to go.
>
Just to be clear: at the moment there isn't an easy way to dedicate
"completely" a cpu for a task. The last time I tried (some years ago
actually) to use exclusive cpu set, the scheduler didn't do a good work
because it was designed for SMP, not SMP minus some piece. However you
can try and you can report your results. It would be interesting.
> The raining questions include
> - how to calculate the maximum latency that can be guaranteed ? (i.e.
> does the Kernel impose any spinlocks and interrupt disables on the would
> be AMP subsystem ?)
No. You can use full dyn tick for example to disable timer interrupt,
but it has got some pros and cons, especially with very low latency
requirement.
> - how to assign an interrupt (e.g. a dedicated timer) to the subsystem ?
Interrupt handler are kernel thread, so you can schedule your kernel
thread on your "normal" cpu.
> - Do the interrupts immediately call the ISR of the cpu "under
> affinity" or is some additional latency imposed by the Kernel
AFAIC, no latency for cpu "under affinity".
> (and how
> many cpu cycles at max are needed to enter the ISR) ?
It's difficult to answer to this question because the performance
depends on your system. From my last statistics I saw that with an rt
linux kernel you can stay below 50us for the interrupt latency.
Marco
next prev parent reply other threads:[~2013-08-02 14:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-02 8:33 AMP on an SMP system Michael Schnell
2013-08-02 11:42 ` Robert Schwebel
2013-08-02 12:13 ` Michael Schnell
2013-08-02 14:53 ` Marco Stornelli [this message]
2013-08-02 15:24 ` Michael Schnell
2013-08-02 15:37 ` Marco Stornelli
2013-08-02 16:00 ` Michael Schnell
2013-08-02 15:58 ` Marco Stornelli
2013-08-03 19:11 ` Robert Schwebel
2013-08-05 7:25 ` Michael Schnell
2013-08-05 8:17 ` Robert Schwebel
2013-08-05 9:04 ` Michael Schnell
2013-08-04 21:28 ` Lambrecht Jürgen
2013-08-05 7:36 ` Michael Schnell
2013-08-05 10:00 ` Lambrecht Jürgen
2013-08-07 8:23 ` Michael Schnell
2013-08-07 8:29 ` Michael Schnell
2013-08-07 9:04 ` Michael Schnell
2013-08-08 7:41 ` Michael Schnell
-- strict thread matches above, loose matches on Subject: below --
2013-08-02 16:16 Jon Sevy
2013-08-05 7:45 ` Michael Schnell
2013-08-05 8:21 ` Robert Schwebel
2013-08-05 8:42 ` Michael Schnell
2013-08-05 9:06 Guenter Ebermann
2013-08-05 9:34 ` Michael Schnell
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=51FBC7FE.4000403@gmail.com \
--to=marco.stornelli@gmail.com \
--cc=linux-embedded@vger.kernel.org \
--cc=mschnell@lumino.de \
--cc=r.schwebel@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).