Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp100085pxb; Wed, 8 Sep 2021 18:40:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhPrCu6b34rP6Vfebl5ApbzPqPXEz2e9g2XrhR1Z9K/P8WDqcyaMsQxU3KIZxvgjwYIpM4 X-Received: by 2002:a02:958e:: with SMTP id b14mr478989jai.123.1631151631706; Wed, 08 Sep 2021 18:40:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631151631; cv=none; d=google.com; s=arc-20160816; b=M2Z8G9aBSZX/Ywg9kaEimJQGT7ZFCR1gumH1g7uAgmB6zANrZSSIPtPkrBwVnHJa2a F131OEeta8agh65DDfTkTtt0e6qESgMzea2ADQs2Q41KYggRuxbqc/S5buzu9yZuNKlU s3gjVhs3NPf+iO1TkjqlcOxt5A6LQTHM0R/KDF39M029R7F0gWLJrXxKmZx+lfPbb0XG AdUWbv9oWK2F3IwqLEjiz2y/6thwtWcgM4Gu+5wx4HZcJe3sGwQ46AXrWvVkaMqlhuGJ k5loziM/PPVE2uCA8YzsWG+j4WpogcHi12YDo8wUHrWgsbhxprOYe6DGifFXBVjUmiU4 PBuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=49gQE5CdmpSJeMRmLY0tZAtttlnA+ylrr1ytu9991b8=; b=Ad0etlRlIiGHfePoNDNFgXlqk+Ug/7ybfWnGpO1PeEhau4VSG9EFd2Cdts3zisoVDO B4B6Du1rpyqhwO7z/TvlcaEYhzY2Xct3a3jyOEoNO9tQZXnFnM07PNRmbyvoMwNe97oj UwDQn1rPdpcRAgjITDkPDNBcvxQhfQg3JSXdVUDHcfg0GHNMZtZHF6n8BCtCk5Pq75U/ 1tN9vSL+mtL44gfi/0gE3wb9yP+dWDZlJChKQNv0cn9QXLDYetfFe315GYBZmLSO6xjw nisTXwWm0lm4dN0/wX+1tyLv1RfitBezYOZsJIwXRIZT1u5ksGPGPctaGIPPYbrv8LtD +B0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si376372ill.70.2021.09.08.18.40.12; Wed, 08 Sep 2021 18:40:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244600AbhIIA7n (ORCPT + 99 others); Wed, 8 Sep 2021 20:59:43 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:15252 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242915AbhIIA7m (ORCPT ); Wed, 8 Sep 2021 20:59:42 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4H4gb81MJXz1DGRh; Thu, 9 Sep 2021 08:57:40 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Thu, 9 Sep 2021 08:58:32 +0800 Received: from [10.174.177.243] (10.174.177.243) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Thu, 9 Sep 2021 08:58:31 +0800 Subject: Re: [PATCH] riscv: enable GENERIC_FIND_FIRST_BIT To: Jisheng Zhang , Paul Walmsley , Palmer Dabbelt , Albert Ou CC: , References: <20210718001423.6b8e1d23@xhacker> <20210908230427.3a92fb87@xhacker> From: Kefeng Wang Message-ID: Date: Thu, 9 Sep 2021 08:58:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20210908230427.3a92fb87@xhacker> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/9/8 23:04, Jisheng Zhang wrote: > Hi Palmer, > > On Sun, 18 Jul 2021 00:14:23 +0800 > Jisheng Zhang wrote: > >> From: Jisheng Zhang >> >> riscv doesn't implement architecture-optimized bitsearching functions >> such as find_first_{zero}_bit() etc. >> >> When GENERIC_FIND_FIRST_BIT=n, find_first_bit() is implemented with >> find_next_bit() which is less efficient. Enable GENERIC_FIND_FIRST_BIT >> for riscv to get more optimized find_first_bit() implementation, an >> initial test(lib/find_bit_benchmark) shows find_first_bit() performance >> is improved by nearly 32%. > It seems this patch is missed. Is it possible to pick it up for 2nd 5.15-rc1 PR? > > Thanks It is enabled unconditionally by following commit commit dbbccfe505ef8fae804677abf0564c1e07479102 Author: Yury Norov Date:   Tue Aug 24 09:59:56 2021 +1000     arch: remove GENERIC_FIND_FIRST_BIT entirely > >> Signed-off-by: Jisheng Zhang >> --- >> arch/riscv/Kconfig | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig >> index 8fcceb8eda07..7ebc54c5c245 100644 >> --- a/arch/riscv/Kconfig >> +++ b/arch/riscv/Kconfig >> @@ -47,6 +47,7 @@ config RISCV >> select GENERIC_ATOMIC64 if !64BIT >> select GENERIC_CLOCKEVENTS_BROADCAST if SMP >> select GENERIC_EARLY_IOREMAP >> + select GENERIC_FIND_FIRST_BIT >> select GENERIC_GETTIMEOFDAY if HAVE_GENERIC_VDSO >> select GENERIC_IOREMAP >> select GENERIC_IRQ_MULTI_HANDLER > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv > . >