From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Levi Yun <ppbuk5246@gmail.com>
Cc: dushistov@mail.ru, arnd@arndb.de, akpm@linux-foundation.org,
gustavo@embeddedor.com, vilhelm.gray@gmail.com,
richard.weiyang@linux.alibaba.com, joseph.qi@linux.alibaba.com,
skalluru@marvell.com, yury.norov@gmail.com, jpoimboe@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib/find_bit_bench: fix the unmatched iterations cnt
Date: Fri, 11 Dec 2020 18:11:54 +0200 [thread overview]
Message-ID: <20201211161154.GV4077@smile.fi.intel.com> (raw)
In-Reply-To: <20201211085039.GA7619@ubuntu>
On Fri, Dec 11, 2020 at 05:50:39PM +0900, Levi Yun wrote:
> We should have same iteration count when we walk the same bitmap
> regardless of using find_next_bit or find_last_bit.
I didn't understand why is so (I mean "same", I think you rather talking about
same order of amount of itterations).
> When we run the find_bit_benchmark.ko, we sometime get
> unmatched iterations count below:
>
> Start testing find_bit() with random-filled bitmap
> [+...] find_next_bit: 875085 ns, 163755 iterations <
> [+...] find_next_zero_bit: 865319 ns, 163926 iterations
> [+...] find_last_bit: 611807 ns, 163756 iterations <
> [+...] find_first_bit: 1601016 ns, 16335 iterations
> [+...] find_next_and_bit: 400645 ns, 74040 iterations
> [+...]
> Start testing find_bit() with sparse bitmap
> [+...] find_next_bit: 9942 ns, 654 iterations
> [+...] find_next_zero_bit: 1678445 ns, 327027 iterations
> [+...] find_last_bit: 7131 ns, 654 iterations
> [+...] find_first_bit: 551383 ns, 654 iterations
> [+...] find_next_and_bit: 3027 ns, 1 iterations
>
> Normally, this is happen when the last bit of bitmap was set.
>
> This patch fix the unmatched iterations count between
> test_find_next_bit and test_find_last_bit.
Can you provide before and after to compare?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2020-12-11 17:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 8:50 [PATCH] lib/find_bit_bench: fix the unmatched iterations cnt Levi Yun
2020-12-11 16:11 ` Andy Shevchenko [this message]
2020-12-11 17:20 ` Yury Norov
2020-12-12 0:09 ` Yun Levi
2020-12-12 18:55 ` Yury Norov
2020-12-13 0:12 ` Yun Levi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201211161154.GV4077@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dushistov@mail.ru \
--cc=gustavo@embeddedor.com \
--cc=joseph.qi@linux.alibaba.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ppbuk5246@gmail.com \
--cc=richard.weiyang@linux.alibaba.com \
--cc=skalluru@marvell.com \
--cc=vilhelm.gray@gmail.com \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox