Message ID | 5CF0F9770200007800233E04@prv1-mh.provo.novell.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | bitops: hweight<N>() improvements | expand |
On 31/05/2019 02:52, Jan Beulich wrote: > According to Linux commit 0136611c62 ("optimize hweight64 for x86_64") > this is a further improvement over the variant using only bitwise > operations. It's also a slight further code size reduction. > > Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com> > Signed-off-by: Jan Beulich <jbeulich@suse.com> This should also include ARM64, which also unconditionally selects HAS_FAST_MULTIPLY in Linux. As for the x86 side of things, Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> > > --- a/xen/arch/x86/Kconfig > +++ b/xen/arch/x86/Kconfig > @@ -12,6 +12,7 @@ config X86 > select HAS_CPUFREQ > select HAS_EHCI > select HAS_EX_TABLE > + select HAS_FAST_MULTIPLY > select HAS_GDBSX > select HAS_IOPORTS > select HAS_KEXEC > >
>>> On 31.05.19 at 21:23, <andrew.cooper3@citrix.com> wrote: > On 31/05/2019 02:52, Jan Beulich wrote: >> According to Linux commit 0136611c62 ("optimize hweight64 for x86_64") >> this is a further improvement over the variant using only bitwise >> operations. It's also a slight further code size reduction. >> >> Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com> >> Signed-off-by: Jan Beulich <jbeulich@suse.com> > > This should also include ARM64, which also unconditionally selects > HAS_FAST_MULTIPLY in Linux. I've very intentionally split the Arm change from the x86 one: Looking at the generated code I'm unconvinced this is a win there, and hence I'd prefer if someone could measure this. It is for this reason that patch 3 was actually sent as RFC. > As for the x86 side of things, Acked-by: Andrew Cooper > <andrew.cooper3@citrix.com> Thanks. Jan
--- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -12,6 +12,7 @@ config X86 select HAS_CPUFREQ select HAS_EHCI select HAS_EX_TABLE + select HAS_FAST_MULTIPLY select HAS_GDBSX select HAS_IOPORTS select HAS_KEXEC
According to Linux commit 0136611c62 ("optimize hweight64 for x86_64") this is a further improvement over the variant using only bitwise operations. It's also a slight further code size reduction. Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Jan Beulich <jbeulich@suse.com>