[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFBcO+9+kiqo-5RXqVuFGdA4yAV0o=zeJaenLZ5zryP-CQfAQQ@mail.gmail.com>
Date: Mon, 14 Jun 2021 16:45:29 +0100
From: Alexey Klimov <aklimov@...hat.com>
To: Yury Norov <yury.norov@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: linux-arch@...r.kernel.org,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Brian Cain <bcain@...eaurora.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Jonas Bonn <jonas@...thpole.se>,
Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
Palmer Dabbelt <palmer@...belt.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Rich Felker <dalias@...c.org>,
David Hildenbrand <david@...hat.com>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexander Lobakin <alobakin@...me>,
Samuel Mendoza-Jonas <sam@...dozajonas.com>,
Jakub Kicinski <kuba@...nel.org>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH 5/8] lib: add find_first_and_bit()
On Sat, Jun 12, 2021 at 1:36 PM Yury Norov <yury.norov@...il.com> wrote:
>
> Currently find_first_and_bit() is an alias to find_next_and_bit(). However,
> it is widely used in cpumask, so it worth to optimize it. This patch adds
> its own implementation for find_first_and_bit().
>
> On x86_64 find_bit_benchmark says:
>
> Before (#define find_first_and_bit(...) find_next_and_bit(..., 0):
> Start testing find_bit() with random-filled bitmap
> [ 140.291468] find_first_and_bit: 46890919 ns, 32671 iterations
> Start testing find_bit() with sparse bitmap
> [ 140.295028] find_first_and_bit: 7103 ns, 1 iterations
>
> After:
> Start testing find_bit() with random-filled bitmap
> [ 162.574907] find_first_and_bit: 25045813 ns, 32846 iterations
> Start testing find_bit() with sparse bitmap
> [ 162.578458] find_first_and_bit: 4900 ns, 1 iterations
>
> (Thanks to Alexey Klimov for thorough testing.)
>
> Signed-off-by: Yury Norov <yury.norov@...il.com>
Tested-by: Alexey Klimov <aklimov@...hat.com>
[..]
Best regards,
Alexey
Powered by blists - more mailing lists