This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH] sysdeps/arm/armv7/multiarch/memcpy_impl.S: Improve performance.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: Will Newton <will dot newton at linaro dot org>, "libc-ports at sourceware dot org" <libc-ports at sourceware dot org>, Patch Tracking <patches at linaro dot org>, Siddhesh Poyarekar <siddhesh at redhat dot com>
- Date: Tue, 3 Sep 2013 19:37:10 +0200
- Subject: Re: [PATCH] sysdeps/arm/armv7/multiarch/memcpy_impl.S: Improve performance.
- Authentication-results: sourceware.org; auth=none
- References: <520894D5 dot 7060207 at linaro dot org> <CANu=DmiBHoymFKTvaW_VsdhWZEYwkfViz1tTeRgj7H80f0FntA at mail dot gmail dot com> <5220D30B dot 9080306 at redhat dot com> <CANu=DmiXLL9v1Z1KS0sBOs-pL8csEUGc9YE829_-tidKd-GruQ at mail dot gmail dot com> <5220F1F0 dot 80501 at redhat dot com> <CANu=DmhA9QvSe6RS72Db2P=yyjC72fsE8d4QZKHEcNiwqxNMvw at mail dot gmail dot com> <52260BD0 dot 6090805 at redhat dot com>
On Tue, Sep 03, 2013 at 12:18:24PM -0400, Carlos O'Donell wrote:
> On 09/02/2013 09:58 AM, Will Newton wrote:
> >> If it's not obvious how is someone supposed to review this patch? :-)
> >
> > With difficulty. ;-)
>
> Thank you for acknowledging that.
>
> > Joseph has raised some good points about the comments and I'll go back
> > through the code and make sure everything is correct in that regard.
> > The change was actually made to the copy of the code in cortex-strings
> > some time ago but I delayed pushing the patch due to the 2.18 release
> > so I have to refresh my memory somewhat.
> >
> > Ideally we would have an agreed upon benchmark with which everyone
> > could analyse the performance of the code on their systems, however
> > that does not seem to exist as far as I can tell.
>
> We have one, it's the glibc microbenchmark, and we want to expand it,
> otherwise when ACME comes with their patch for ARM and breaks performance
> for targets that Linaro cares about I have no way to reject the patch
> objectively :-)
>
Carlos, you are asking for impossible. When you publish benchmark people
will try to maximize benchmark number. After certain point this becomes
possible only by employing shady accounting: Move part of time to place
wehre it will not be measured by benchmark (for example by having
function that is 4kb large, on benchmarks it will fit into instruction
cache but that does not happen in reality).
Taking care of common factors that can cause that is about ten times
more complex than whole system benchmarking, analysis will be quite
difficult as you will get twenty numbers and you will need to decide
which ones could made real impact and which wont.
> > The key advantage of the cortex-strings framework is that it allows
> > graphing the results of benchmarks. Often changes to string function
> > performance can only really be analysed graphically as otherwise you
> > end up with a huge soup of numbers, some going up, some going down and
> > it is very hard to separate the signal from the noise.
>
> I disagree strongly. You *must* come up with a measurable answer and
> looking at a graph is never a solution I'm going to accept.
>
You can have that opinion.
Looking at performance graphs is most powerful technique how to
understand performance. I got most of my improvements from analyzing
these.
> You need to statistically analyze the numbers, assign weights to ranges,
> and come up with some kind of number that evaluates the results based
> on *some* formula. That is the only way we are going to keep moving
> performance forward (against some kind of criteria).
>
These accurate assigning weigths is best done by taking program running
it and measuring time. Without taking this into account weigths will not
tell much, as you will likely just optimize cold code at expense of hot
code.
> > The glibc benchmarks also have some other weaknesses that should
> > really be addressed, hopefully I'll have some time to write patches
> > for some of this work.
>
> Thank you very much.
>
> Cheers,
> Carlos.