From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3111 invoked by alias); 3 Sep 2013 22:27:22 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 3102 invoked by uid 89); 3 Sep 2013 22:27:22 -0000 Received: from popelka.ms.mff.cuni.cz (HELO popelka.ms.mff.cuni.cz) (195.113.20.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Sep 2013 22:27:22 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,SPF_NEUTRAL autolearn=no version=3.3.2 X-HELO: popelka.ms.mff.cuni.cz Received: from domone.kolej.mff.cuni.cz (popelka.ms.mff.cuni.cz [195.113.20.131]) by popelka.ms.mff.cuni.cz (Postfix) with ESMTPS id 7968F69294; Wed, 4 Sep 2013 00:27:15 +0200 (CEST) Received: by domone.kolej.mff.cuni.cz (Postfix, from userid 1000) id 4E5615F822; Wed, 4 Sep 2013 00:27:15 +0200 (CEST) Date: Tue, 03 Sep 2013 22:27:00 -0000 From: =?utf-8?B?T25kxZllaiBCw61sa2E=?= To: "Ryan S. Arnold" Cc: Carlos O'Donell , Will Newton , "libc-ports@sourceware.org" , Patch Tracking , Siddhesh Poyarekar Subject: Re: [PATCH] sysdeps/arm/armv7/multiarch/memcpy_impl.S: Improve performance. Message-ID: <20130903222715.GA7148@domone.kolej.mff.cuni.cz> References: <520894D5.7060207@linaro.org> <5220D30B.9080306@redhat.com> <5220F1F0.80501@redhat.com> <52260BD0.6090805@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00030.txt.bz2 On Tue, Sep 03, 2013 at 02:31:14PM -0500, Ryan S. Arnold wrote: > On Tue, Sep 3, 2013 at 11:18 AM, Carlos O'Donell wrote: > > 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 :-) > > Can you be objective in analyzing performance when two different > people have differing opinions on what performance preconditions > should be coded against? > I fear more situations like when google and facebook will send their implementation which saves each milion dollars in energy bill over others implementation. > > 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). > > This sounds like establishing preconditions (what types of data will > be optimized for). > > Unless technology evolves that you can statistically analyze data in > real time and adjust the implementation based on what you find (an > implementation with a different set of preconditions) to account for > this you're going to end up with a lot of in-fighting over > performance. > Technology is there at least for x64, its political problem. You do not need real time analysis most of time. When user accepts possibility performance could be worse by constant factor then profiling becomes easier. We could rely on data from previous runs of program instead. First step would be to replace ifunc selection by first running benchmarks on processor and then creating hash table with numbers of fastest implementation and selection will be done by this lookup. My profiler could(modulo externalities) for each program measure which implementation is fastest on given processor. Then AFAIR appending data to elf is legal so we could append hash table with program specific numbers to binary. A ifunc resolver will first look to end of binary if there is ifunc table. This could be implemented that worst that can happen for false positive is selecting slow implementation. If there is entry for current processor it will use it, otherwise it will look to table at end of libc.so and repeat this step and if it was not found it will use default implementation. This is doable, problems is motivate somebody to do profiling. My approach tries to it possible for programmers (write testing, run it at different machines and assemble), distributions (find enough users that will agree to have sometimes turned profiling on and sending results.) or end users who could turn profiling on to learn their patterns.