From: Ayman El-Khashab <ayman@elkhashab.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: ppc44x - how do i optimize driver for tlb hits
Date: Sun, 3 Oct 2010 14:13:05 -0500 [thread overview]
Message-ID: <20101003191305.GA7345@crust.elkhashab.com> (raw)
In-Reply-To: <1285366264.14081.33.camel@pasglop>
On Sat, Sep 25, 2010 at 08:11:04AM +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2010-09-24 at 08:08 -0500, Ayman El-Khashab wrote:
> >
> > I suppose another option is to to use the kernel profiling option I
> > always see but have never used. Is that a viable option to figure out
> > what is happening here?
>
> With perf and stochastic sampling ? If you sample fast enough... but
> you'll mostly point to your routine I suppose... though it might tell
> you statistically where in your code, which -might- help.
>
Thanks I didn't end up profiling it b/c we found the biggest culprit.
Basically we were mapping this memory in kernel space and as long as we
did that ONLY everything was ok. But then we would mmap the physical
addresses into user space. Using MAP_SHARED made it extremely slow.
Using MAP_PRIVATE made it very fast. So it works, but why is MAP_SHARED
that much slower?
The other optimization was a change in the algorithm to take advantage
of the L2 prefetching. Since we were operating on many simultaneous
streams it seems that the cache performance was not good.
thanks
ame
next prev parent reply other threads:[~2010-10-03 19:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 15:12 ppc44x - how do i optimize driver for tlb hits Ayman El-Khashab
2010-09-23 22:01 ` Benjamin Herrenschmidt
2010-09-23 22:35 ` Ayman El-Khashab
2010-09-24 1:07 ` Benjamin Herrenschmidt
2010-09-24 2:58 ` Ayman El-Khashab
2010-09-24 4:43 ` Benjamin Herrenschmidt
2010-09-24 10:30 ` Josh Boyer
2010-09-24 13:08 ` Ayman El-Khashab
2010-09-24 22:11 ` Benjamin Herrenschmidt
2010-10-03 19:13 ` Ayman El-Khashab [this message]
2010-10-03 22:38 ` Benjamin Herrenschmidt
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=20101003191305.GA7345@crust.elkhashab.com \
--to=ayman@elkhashab.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).