From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932824AbbJ3PyP (ORCPT ); Fri, 30 Oct 2015 11:54:15 -0400 Received: from smtprelay4.synopsys.com ([198.182.47.9]:60983 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751704AbbJ3PyO (ORCPT ); Fri, 30 Oct 2015 11:54:14 -0400 From: Alexey Brodkin To: "nicolas.pitre@linaro.org" CC: "shemminger@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "Vineet.Gupta1@synopsys.com" , "linux-snps-arc@lists.infradead.org" , "mans@mansr.com" , "rmk+kernel@arm.linux.org.uk" , "davem@davemloft.net" , "mingo@elte.hu" Subject: Re: [PATCH] __div64_32: implement division by multiplication for 32-bit arches Thread-Topic: [PATCH] __div64_32: implement division by multiplication for 32-bit arches Thread-Index: AQHRExAiJ9hBuINsYEu79ImC2YEdpZ6EFTyAgAAKRAA= Date: Fri, 30 Oct 2015 15:54:02 +0000 Message-ID: <1446220442.4394.42.camel@synopsys.com> References: <1446072455-16074-1-git-send-email-abrodkin@synopsys.com> In-Reply-To: Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.225.15.89] Content-Type: text/plain; charset="utf-8" Content-ID: <5852D2AD2CD9E546B0CCCF0D5ADCB833@internal.synopsys.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t9UFsJ9R021349 Hi Nicolas, On Fri, 2015-10-30 at 11:17 -0400, Nicolas Pitre wrote: > On Fri, 30 Oct 2015, Måns Rullgård wrote: > > > Nicolas Pitre writes: > > > > > OK... I was intrigued, so I adapted my ARM code to the generic case, > > > including the overflow avoidance optimizations. Please have look and > > > tell me how this works for you. > > > > > > If this patch is accepted upstream, then it could be possible to > > > abstract only the actual multiplication part with some architecture > > > specific assembly. > > > > Good idea. > > Could you please provide a reviewed-by or acked-by tag? Sure! Acked-by: Alexey Brodkin BTW I thought about that optimization a bit more and now I think we may even skip addition of arch-specific assembly insertions. That's because that kind of division as discussed many times should be used as limited as possible, in other words there should be just a very few usages of it especially in very frequently used code paths. And in that case there might be not much of benefit having do_div() even faster and smaller than the one we're about to get with your change. -Alexey{.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I