riscv: enable GENERIC_FIND_FIRST_BIT
PATCH 1/1 riscv: enable GENERIC_FIND_FIRST_BIT
From: Jisheng Zhang <[email protected]>
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%.
--- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/riscv/Kconfig +1 -0
@@ -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
Signature · 1 line
2.32.0
Hi Palmer,
Quoted 10 lines · On Sun, 18 Jul 2021 00:14:23 +0800 Jisheng Zhang wrote:
From: Jisheng Zhang <[email protected]>
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 withfind_next_bit()which is less efficient. EnableGENERIC_FIND_FIRST_BITfor riscv to get more optimizedfind_first_bit()implementation, an initialtest(lib/find_bit_benchmark)showsfind_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
Quoted 18 lines
Signed-off-by Jisheng Zhang <[email protected]>--- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/riscv/Kconfig +1
-0@@ -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
Quoted 10 lines · Jisheng Zhang
Hi Palmer,
Quoted 5 lines · On Sun, 18 Jul 2021 00:14:23 +0800 Jisheng Zhang wrote:
From: Jisheng Zhang <[email protected]>
riscv doesn't implement architecture-optimized bitsearching functions such as find_first_{zero}_bit() etc.
Quoted 8 lines
Quoted 5 lines
When GENERIC_FIND_FIRST_BIT=n,
find_first_bit()is implemented withfind_next_bit()which is less efficient. EnableGENERIC_FIND_FIRST_BITfor riscv to get more optimizedfind_first_bit()implementation, an initialtest(lib/find_bit_benchmark)showsfind_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 <[email protected]>
Date: Tue Aug 24 09:59:56 2021 +1000
arch: remove GENERIC_FIND_FIRST_BIT entirely
Quoted 26 lines
Quoted 11 lines
Signed-off-by Jisheng Zhang <[email protected]>--- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/riscv/Kconfig +0
-0arch/riscv/Kconfig config RISCV · line 53
Quoted 7 lines
arch/riscv/Kconfig +1
-0@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
.
Quoted 20 lines · On Thu, 9 Sep 2021 08:58:31 +0800 Kefeng Wang <[email protected]>…
Quoted 10 lines · Jisheng Zhang
Hi Palmer,
Quoted 5 lines · On Sun, 18 Jul 2021 00:14:23 +0800 Jisheng Zhang wrote:
From: Jisheng Zhang <[email protected]>
riscv doesn't implement architecture-optimized bitsearching functions such as find_first_{zero}_bit() etc.
Quoted 8 lines
Quoted 5 lines
When GENERIC_FIND_FIRST_BIT=n,
find_first_bit()is implemented withfind_next_bit()which is less efficient. EnableGENERIC_FIND_FIRST_BITfor riscv to get more optimizedfind_first_bit()implementation, an initialtest(lib/find_bit_benchmark)showsfind_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
Quoted 9 lines
It is enabled unconditionally by following commit
commit
dbbccfe505ef8fae804677abf0564c1e07479102Author: Yury Norov <[email protected]>
Date: Tue Aug 24 09:59:56 2021 +1000arch: remove
GENERIC_FIND_FIRST_BITentirely
Aha, thanks for the information. After Yury's commit, this patch is useless now.
thanks
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv