From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30758C433DB for ; Wed, 24 Feb 2021 09:35:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B500064EBB for ; Wed, 24 Feb 2021 09:35:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B500064EBB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QrWr77hKW4GsxiUM9RRD65noxUfOrcAcVmhULtSluGU=; b=xcLzYDuYyfanME3cxIhzr/HbC /nMS5OI+dbieGwVggREABnXhfjNlN4CkY2uuTNRKYHoC6KVQgs1NG087qIWTlbeQ4BsNkxWW+knWl ORL9H49TKXk0mewfILyhSM2IiJ6OxbUBmT6pUCOsG/7v+uJ8rz3hM2AQeslr8sY53ZQRtXsYJlTmw KDJv67TYzx/Sl5dl/agZQvpBpc81MoKKNZ7+TPlZfKjSObRmJF1VDOoYsnA2NWkBPKd1TF8pftaq2 WI3YmBFv0Z0sD2JVgrq4Xn3f8GlZLmYB583LFg7OdPXtlFcf8IFqzSbfLgkUloW4vgGQ9demPSmHE uxa8YbJLA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEqYM-0003Cx-Vj; Wed, 24 Feb 2021 09:33:55 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEqYH-0003CY-SC for linux-arm-kernel@lists.infradead.org; Wed, 24 Feb 2021 09:33:52 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 98368614A5; Wed, 24 Feb 2021 09:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614159228; bh=/CF20OHQ7K0JhgmeOCBr7qeOZntk0MWyxxmZPAU4v98=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qi1W+/eGUtnIWAUKAzopoH5TWZl7ik9XR7jKSMR1Rf6v1SNwG4lMWVIR2duhS7AuC fjbpTOWdiry0E4J2dUEHu6JgC+yfF348N1VJ/JWZ5OLn0zE8pK/sG2d7rb/eQEmBjw wzB0y7FzhJyXdDqh4F7HUvmXiLnWjSismhgru7TMyvRVI9wzjYgqzYSmH5soEQhSjY gSIu7pqC9jffD1vUwH5Uds2WX0sjMa5c46/uNXzcGZ/hxRuwcDOu1DggT+PERmTAGt m4WZGyVTry5AEtbD+s8r2xQ8NSHQhKe2SCwTdyiiP46LouNSOd5scwmUPYSwCjFl+I EPzhDr2Crt/eg== Date: Wed, 24 Feb 2021 09:33:44 +0000 From: Will Deacon To: Yury Norov Subject: Re: [PATCH] arm64: enable GENERIC_FIND_FIRST_BIT Message-ID: <20210224093343.GA11306@willie-the-truck> References: <20201205165406.108990-1-yury.norov@gmail.com> <20201207112530.GB4379@willie-the-truck> <20201208103549.GA5887@willie-the-truck> <20210224052744.GA1168363@yury-ThinkPad> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210224052744.GA1168363@yury-ThinkPad> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210224_043350_026861_6C444A6A X-CRM114-Status: GOOD ( 23.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Catalin Marinas , Alexey Klimov , Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Feb 23, 2021 at 09:27:44PM -0800, Yury Norov wrote: > On Tue, Dec 08, 2020 at 10:35:50AM +0000, Will Deacon wrote: > > On Mon, Dec 07, 2020 at 05:59:16PM -0800, Yury Norov wrote: > > > (CC: Alexey Klimov) > > > > > > On Mon, Dec 7, 2020 at 3:25 AM Will Deacon wrote: > > > > > > > > On Sat, Dec 05, 2020 at 08:54:06AM -0800, Yury Norov wrote: > > > > > ARM64 doesn't implement find_first_{zero}_bit in arch code and doesn't > > > > > enable it in config. It leads to using find_next_bit() which is less > > > > > efficient: > > > > > > > > [...] > > > > > > > > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > > > > > index 1515f6f153a0..2b90ef1f548e 100644 > > > > > --- a/arch/arm64/Kconfig > > > > > +++ b/arch/arm64/Kconfig > > > > > @@ -106,6 +106,7 @@ config ARM64 > > > > > select GENERIC_CPU_AUTOPROBE > > > > > select GENERIC_CPU_VULNERABILITIES > > > > > select GENERIC_EARLY_IOREMAP > > > > > + select GENERIC_FIND_FIRST_BIT > > > > > > > > Does this actually make any measurable difference? The disassembly with > > > > or without this is _very_ similar for me (clang 11). > > > > > > > > Will > > > > > > On A-53 find_first_bit() is almost twice faster than find_next_bit(), > > > according to > > > lib/find_bit_benchmark. (Thanks to Alexey for testing.) > > > > I guess it's more compiler dependent than anything else, and it's a pity > > that find_next_bit() isn't implemented in terms of the generic > > find_first_bit() tbh, but if the numbers are as you suggest then I don't > > have a problem selecting this on arm64. > > Ping? Not sure what happened to this. Maybe resend at -rc1? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel