From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D706C433EF for ; Thu, 9 Sep 2021 20:57:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1A23761186 for ; Thu, 9 Sep 2021 20:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345533AbhIIU6l (ORCPT ); Thu, 9 Sep 2021 16:58:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:48764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233573AbhIIU6k (ORCPT ); Thu, 9 Sep 2021 16:58:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 96FFD6103E; Thu, 9 Sep 2021 20:57:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1631221050; bh=iSl0R3Oe1aIfCYROTGI9JYcjuSttAlk0zbg8pgCRtWc=; h=Date:From:To:Subject:From; b=E2KlDbHB7v4v2NmP0AakYsA9sloo+caO+lTF3Qopiw/eaGWCaxuaMAxDPwkFkiRsD hRcUe5LWdMS3M31ugJkpcH2qz9sE1hEI/wiJALSKngsmmv9/lThlsZSt5TZ3g7j6hq LZWEIC8bQUzx48XK3xcKv/zN2GxjXGVh0jPzRIhY= Date: Thu, 09 Sep 2021 13:57:30 -0700 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 Message-ID: <20210909205730.W_y9_UECh%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org 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 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 Tested-by: Wolfram Sang Cc: Alexander Lobakin Cc: Alexey Klimov Cc: Andy Shevchenko Cc: Dennis Zhou Cc: Jiri Olsa Cc: Ulf Hansson Cc: Will Deacon Signed-off-by: Andrew Morton --- 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