From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934272AbbKSQ20 (ORCPT ); Thu, 19 Nov 2015 11:28:26 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:61041 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751888AbbKSQ2Y (ORCPT ); Thu, 19 Nov 2015 11:28:24 -0500 From: Arnd Bergmann To: Nicolas Pitre Cc: Russell King - ARM Linux , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [GIT PULL] optimize 64-by-32 ddivision for constant divisors on 32-bit machines Date: Thu, 19 Nov 2015 17:28:20 +0100 Message-ID: <3830931.6tMHPeiNRU@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:btWa1T574hf+h/JEXnH0fcPWKexWyHOgiJapDgciSr/zcSl/xfK I+3zyr/c1euTckaxtWpmDBT5WWiMdDkqiDQTt5gc0tl+9XcqigJ9W6Vggg/sqVrufG9bMv9 P/dRNWfTQASAhrTWuZCCnvm0ZNkur+9UM1Q4GR6pGoBcnFqpyjpLobeh6WUhbAwagRuhrbK mdYc5gY3XDvh+EUP45hzg== X-UI-Out-Filterresults: notjunk:1;V01:K0:xpqkDjan42Y=:uQiy+lB03mb/RhoM/EpMzO PoIc8xz/ZgtgHjxev3GEiSCSGjNlF8tgiGiL6tu7LYM4UrtQJ6tLGzVQtMnloW0sjESu+hrfr ONhzAjFvKU585q1b6hMkLXNylw8cHIk95XMivKn+bf9q0+RJ1FiWdRdoW9N2/XQ5iFO9FBho0 WMktPAOULzgIxyPlS2ncJOivbTVesM7sq/de+zZ1tFJ1A4nkgGh7xaNwCDnKpp2RyM1O5FfTE ZVM8UxBL+9FMJpgwOixNqdfBpzYXqriIXa4w77MquESk9fL7VTKKvlBZSDRyfrrb1ZORI8yLu MAyl8cbvEn3qymTHVJYtQeM7eZSdPMcBF0AdVQp8ZbxJHhTcrNNa6162Q6RWyEckN4ifYWTDc 8EI0bQkjetxWicXM4j6mKHXyGH/eGXBglMRxZRChSYDh+cvEYh42myxJjNmZ//Hx3ywq0oGcc VTCs++dL81hQU82bfDCdCDpXluJecFqbgURoTv5PHCjqPg+LYlYKTQiOsjhZCHxArMorCdhf1 4IFc/IZx7Dlp0zL4N5A2M0S+EYHO/z4ALJ82C11DYMs9Vh3quWmlbaSn29rTDV6j0EAwFeBSY 6pteMrurdHr1xJCKEeu1m2mlzGz/g5o4wjph/Df42OZ9WlxLzO0u28BCj55WJSRsjsjs5mvc5 91Fxn1TGjhAVO6/ONwK8ZUXHvL2SnBo8Zh363TBhfUztNKJCNg4vSv3lm8yHBrI3qS+1j6ZmY t14iBvQaJoWGKmO2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 16 November 2015 20:20:38 Nicolas Pitre wrote: > Arnd, > > Please pull the following branch: > > git://git.linaro.org/people/nicolas.pitre/linux div64 > > This contains those patches I've initially posted here: > > https://lkml.org/lkml/2015/11/2/715 > > Only changes to those posted patches are cosmetic improvements such as > the use of ilog2() replacing the custom __div64_ffs(). Exposure in > linux-next would be a good thing. > > I also included fixes for a couple do_div() misuses that an allyesconfig > build turned up after switching ARM to the generic do_div() code. > Those patches have been posted separately and addressed to relevant > maintainers. They are included here until/unless those maintainers > include those patches in their tree. > > Original cover letter: > > This is a generalization of the optimization I produced for ARM a decade > ago to turn constant divisors into a multiplication by the divisor > reciprocal. Turns out that after all those years gcc is still not > optimizing things on its own for that case. > > This has important performance benefits as discussed in this thread: > > https://lkml.org/lkml/2015/10/28/851 > > This series brings the formerly ARM-only optimization to all 32-bit > architectures using C code by default. The possibility for the actual > multiplication to be implemented in assembly is provided in order to get > optimal code. The ARM version can be used as an example implementation > for other interested architectures to implement. > Pulled into my asm-generic tree now, it should show up in linux-next tomorrow. Thanks, Arnd