[PATCH v2] lib: optimize cpumask_next_and()

2017-10-26 Thread Clement Courbet
Hi Alexey, > Gentoo ships 5.4.0 which doesn't inline this code on x86_64 defconfig > (which has OPTIMIZE_INLINING). I have not actually marked _find_next_bit() inline, it just turns out that my compiler inlines it. I've tried out marking the function inline and OPTIMIZE_INLINING does not un-inlin

Re: [PATCH v2] lib: optimize cpumask_next_and()

2017-10-26 Thread kbuild test robot
Hi Clement, [auto build test ERROR on linus/master] [also build test ERROR on v4.14-rc6 next-20171018] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Clement-Courbet/lib-optimize-cpumask_next_an

Re: [PATCH v2] lib: optimize cpumask_next_and()

2017-10-26 Thread kbuild test robot
Hi Clement, [auto build test ERROR on linus/master] [also build test ERROR on v4.14-rc6 next-20171018] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Clement-Courbet/lib-optimize-cpumask_next_an

Re: Re [PATCH v2] lib: optimize cpumask_next_and()

2017-10-25 Thread Yury Norov
On Wed, Oct 25, 2017 at 06:50:14PM +0300, Yury Norov wrote: > On Wed, Oct 25, 2017 at 05:28:41PM +0200, Clement Courbet wrote: > > Thanks for the comments Yury. > > > > > But I'd like also to keep _find_next_bit() consistent with > > > _find_next_bit_le() > > > > Not sure I understand what you're

Re: Re [PATCH v2] lib: optimize cpumask_next_and()

2017-10-25 Thread Yury Norov
On Wed, Oct 25, 2017 at 05:28:41PM +0200, Clement Courbet wrote: > Thanks for the comments Yury. > > > But I'd like also to keep _find_next_bit() consistent with > > _find_next_bit_le() > > Not sure I understand what you're suggesting here: Do you want a > find_next_and_bit_le() or do you want to

Re [PATCH v2] lib: optimize cpumask_next_and()

2017-10-25 Thread Clement Courbet
Thanks for the comments Yury. > But I'd like also to keep _find_next_bit() consistent with > _find_next_bit_le() Not sure I understand what you're suggesting here: Do you want a find_next_and_bit_le() or do you want to make _find_next_bit_le() more like _find_next_bit() ? In the latter case we mi

Re: [PATCH v2] lib: optimize cpumask_next_and()

2017-10-25 Thread Yury Norov
On Tue, Oct 24, 2017 at 12:51:59PM +0200, Clement Courbet wrote: > We've measured that we spend ~0.6% of sys cpu time in cpumask_next_and(). > It's essentially a joined iteration in search for a non-zero bit, which > is currently implemented as a lookup join (find a nonzero bit on the > lhs, lookup

RE: [PATCH v2] lib: optimize cpumask_next_and()

2017-10-25 Thread Matthew Wilcox
Ingo Molnar > ; linux-a...@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: [PATCH v2] lib: optimize cpumask_next_and() > > We've measured that we spend ~0.6% of sys cpu time in cpumask_next_and(). > It's essentially a joined iteration in search for a non-zero bit,

[PATCH v2] lib: optimize cpumask_next_and()

2017-10-24 Thread Clement Courbet
We've measured that we spend ~0.6% of sys cpu time in cpumask_next_and(). It's essentially a joined iteration in search for a non-zero bit, which is currently implemented as a lookup join (find a nonzero bit on the lhs, lookup the rhs to see if it's set there). Implement a direct join (find a nonz