From: akpm@linux-foundation.org
To: aklimov@redhat.com, alobakin@pm.me,
andriy.shevchenko@linux.intel.com, dennis@kernel.org,
jolsa@redhat.com, mm-commits@vger.kernel.org,
ulf.hansson@linaro.org, will@kernel.org,
wsa+renesas@sang-engineering.com, yury.norov@gmail.com
Subject: [to-be-updated] lib-bitmap-add-performance-test-for-bitmap_print_to_pagebuf.patch removed from -mm tree
Date: Thu, 09 Sep 2021 13:57:30 -0700 [thread overview]
Message-ID: <20210909205730.W_y9_UECh%akpm@linux-foundation.org> (raw)
The patch titled
Subject: lib: bitmap: add performance test for bitmap_print_to_pagebuf
has been removed from the -mm tree. Its filename was
lib-bitmap-add-performance-test-for-bitmap_print_to_pagebuf.patch
This patch was dropped because an updated version will be merged
------------------------------------------------------
From: Yury Norov <yury.norov@gmail.com>
Subject: lib: bitmap: add performance test for bitmap_print_to_pagebuf
Functional tests for bitmap_print_to_pagebuf() are provided in
lib/test_printf.c. This patch adds performance test for a case of fully
set bitmap.
Link: https://lkml.kernel.org/r/20210814211713.180533-17-yury.norov@gmail.com
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Alexander Lobakin <alobakin@pm.me>
Cc: Alexey Klimov <aklimov@redhat.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/test_bitmap.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
--- a/lib/test_bitmap.c~lib-bitmap-add-performance-test-for-bitmap_print_to_pagebuf
+++ a/lib/test_bitmap.c
@@ -430,6 +430,42 @@ static void __init test_bitmap_parselist
}
}
+static void __init test_bitmap_printlist(void)
+{
+ unsigned long *bmap = kmalloc(PAGE_SIZE, GFP_KERNEL);
+ char *buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
+ char expected[256];
+ int ret, slen;
+ ktime_t time;
+
+ if (!buf || !bmap)
+ goto out;
+
+ memset(bmap, -1, PAGE_SIZE);
+ slen = snprintf(expected, 256, "0-%ld", PAGE_SIZE * 8 - 1);
+ if (slen < 0)
+ goto out;
+
+ time = ktime_get();
+ ret = bitmap_print_to_pagebuf(true, buf, bmap, PAGE_SIZE * 8);
+ time = ktime_get() - time;
+
+ if (ret != slen + 1) {
+ pr_err("bitmap_print_to_pagebuf: result is %d, expected %d\n", ret, slen);
+ goto out;
+ }
+
+ if (strncmp(buf, expected, slen)) {
+ pr_err("bitmap_print_to_pagebuf: result is %s, expected %s\n", buf, expected);
+ goto out;
+ }
+
+ pr_err("bitmap_print_to_pagebuf: input is '%s', Time: %llu\n", buf, time);
+out:
+ kfree(buf);
+ kfree(bmap);
+}
+
static const unsigned long parse_test[] __initconst = {
BITMAP_FROM_U64(0),
BITMAP_FROM_U64(1),
@@ -669,6 +705,7 @@ static void __init selftest(void)
test_bitmap_arr32();
test_bitmap_parse();
test_bitmap_parselist();
+ test_bitmap_printlist();
test_mem_optimisations();
test_for_each_set_clump8();
test_bitmap_cut();
_
Patches currently in -mm which might be from yury.norov@gmail.com are
vsprintf-rework-bitmap_list_string.patch
reply other threads:[~2021-09-09 20:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210909205730.W_y9_UECh%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=aklimov@redhat.com \
--cc=alobakin@pm.me \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dennis@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=will@kernel.org \
--cc=wsa+renesas@sang-engineering.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;
as well as URLs for NNTP newsgroup(s).