From: Phil Blundell <pb@reciva.com>
To: openembedded-devel@lists.openembedded.org
Subject: arm kernel configurations
Date: Wed, 29 Oct 2008 15:26:55 +0000 [thread overview]
Message-ID: <1225294016.3822.81.camel@mill.internal.reciva.com> (raw)
On the subject of gta01 performance I thought it might be worth pointing
out a couple of common kernel inefficiencies:
- out of the box, the arm kernel always compiles itself with APCS-style
frame pointers enabled. This means that you lose a general purpose
register, and makes the function prologue and epilogue sequences more
heavyweight. For production use I would always recommend turning off
frame pointers (which involves patching arch/arm/Kconfig.debug) in order
to get a smaller and faster kernel.
- if your userspace is pure EABI, make sure that you have
CONFIG_OABI_COMPAT turned off. With this option enabled, the kernel
needs to inspect all SWI instructions to see if they might be OABI
syscalls: on machines with Harvard caches, this will almost certainly
involve hauling a cacheline in from main memory, which is slow and leads
to poor dcache utilisation (since you are loading eight words of which
only one is likely to be any use).
- if your userspace doesn't depend on load-rotate (most doesn't
nowadays) then you can hard-wire the alignment trap behaviour to be
SIGBUS and avoid reloading cp15 on every kernel entry. This saves
another two lines in the dcache. I don't have a pretty patch for this
yet but contributions would be welcome :-)
These three changes make a measurable difference to the kernel benchmark
results. For example, syscall entry/exit drops from about 490ns to
about 390ns on my gta01, an improvement of more than 20%. The cost of
stat() drops from 36.8us to 33.2us, an improvement of 14%.
share and enjoy
p.
next reply other threads:[~2008-10-29 15:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 15:26 Phil Blundell [this message]
2008-10-30 14:40 ` arm kernel configurations Tom Talpey
[not found] ` <E1KvYmj-0007s2-Og@linuxtogo.org>
2008-10-30 15:08 ` Phil Blundell
2008-10-30 16:45 ` Tom Talpey
[not found] ` <E1Kvahy-0001AR-Sj@linuxtogo.org>
2008-10-30 17:13 ` Phil Blundell
2008-10-30 18:09 ` Tom Talpey
[not found] ` <E1Kvc17-0001Gl-VY@linuxtogo.org>
2008-10-30 18:37 ` Tom Talpey
2008-10-30 18:42 ` Phil Blundell
[not found] ` <E1KvcSD-0007H7-V3@linuxtogo.org>
2008-10-30 19:01 ` Phil Blundell
2008-10-30 20:10 ` Tom Talpey
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=1225294016.3822.81.camel@mill.internal.reciva.com \
--to=pb@reciva.com \
--cc=openembedded-devel@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox