From patchwork Mon Jul 19 02:17:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 12384585 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=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 26E39C636CA for ; Mon, 19 Jul 2021 02:18:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B453561168 for ; Mon, 19 Jul 2021 02:18:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B453561168 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 48B356B012C; Sun, 18 Jul 2021 22:18:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 462948D00FA; Sun, 18 Jul 2021 22:18:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 303AF6B012E; Sun, 18 Jul 2021 22:18:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0195.hostedemail.com [216.40.44.195]) by kanga.kvack.org (Postfix) with ESMTP id 050AA6B012C for ; Sun, 18 Jul 2021 22:18:08 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A3434180163C1 for ; Mon, 19 Jul 2021 02:18:07 +0000 (UTC) X-FDA: 78377727414.39.838BAB3 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) by imf15.hostedemail.com (Postfix) with ESMTP id 60B5DD0000B0 for ; Mon, 19 Jul 2021 02:18:07 +0000 (UTC) Received: by mail-qt1-f182.google.com with SMTP id r17so11988989qtp.5 for ; Sun, 18 Jul 2021 19:18:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eK4dLN6Hh5Xn+AoNYC/jTTz3XjpPwSRyowzhMkiPWZ4=; b=YyZCJUDo33wlu/PklnfLM6m/u/vzKF62OVgo3EGkCp7IwPoNPG8NPuszyLI/gALdhT wawKLIe4qiWzWOkdgb6X6dvnyjKacJ7AghiSpQ4Dn6DQOJAhBMeM1BBZNHV0uxVz2P33 apkvrQsNsP2lJ7htulIBsIOjbmksX9iQQhkjQbgm+b8HKsVd9YLsUAGVfRp/h/zKrtbN GSLCQQKucqNPxmIemSvi2b0PvyK8ZmbCHBWI/1dDTjW0OGmlNO6ov8lW968fYxQu3t0W d7mIy3EDJ5Yqtys/70TN+SoOCh9B7o3ONFqf0mRTW/rJ7Ja4Nj4oGKTfMnItLMWC41rU TQ4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eK4dLN6Hh5Xn+AoNYC/jTTz3XjpPwSRyowzhMkiPWZ4=; b=sKp0Zg43DjOo14opIROSGg+k9lAfPBnPB65s6CiqunfbeOKK0N1mAV9o0lPvM0Vggt 3I3EHB3CTdssmj/PLevZGOITkRKKOw5B0k/KHtE1zWAfLLaX8R+Qk2tDa7tE4+RABo/B jYupKdI2ctvofFXBl1b+BQ1chanc2A3KPMzR9T2CldPK2r7C2xnM0/dU6OXckMVrnfA/ eKhWFI0ABKzdZjpOSh/jp0QGFiN2HeiwrOkh14B3lsYYexVk00Xrl2ORpbUVJNTMQVxc MKPyE8HGneOvPmZwHD6IW8jwtKRLsOpmtGa6MPRIad7CUo6Afn338Os3U8X2XMAJEn5v YASQ== X-Gm-Message-State: AOAM531wkWrMGnlq8osV/7Vt/a2WWvP9oON8PBvRBsMnGoh94O+miCrX 91PPqLoMVT8Rlhc0dEK/QF0= X-Google-Smtp-Source: ABdhPJz9CBPYo+uPdMEMMh21TBch2HQ+d3d/po8ULWIUDdW5L/qjQkGRlxiBnbFzjcFH9PbHRzp0Qw== X-Received: by 2002:a05:622a:14d3:: with SMTP id u19mr9545947qtx.258.1626661086530; Sun, 18 Jul 2021 19:18:06 -0700 (PDT) Received: from localhost ([207.98.216.60]) by smtp.gmail.com with ESMTPSA id y24sm8025966qkj.4.2021.07.18.19.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jul 2021 19:18:06 -0700 (PDT) From: Yury Norov To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-mmc@vger.kernel.org Cc: Yury Norov , Andy Shevchenko , Rasmus Villemoes , Petr Mladek , Sergey Senozhatsky , Tejun Heo , Steven Rostedt , Wolfram Sang , Ulf Hansson , Dennis Zhou , Christoph Lameter , Andrew Morton Subject: [PATCH v2 0/4] bitmap: unify for_each_bit() macros Date: Sun, 18 Jul 2021 19:17:51 -0700 Message-Id: <20210719021755.883182-1-yury.norov@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=YyZCJUDo; spf=pass (imf15.hostedemail.com: domain of yurynorov@gmail.com designates 209.85.160.182 as permitted sender) smtp.mailfrom=yurynorov@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 60B5DD0000B0 X-Stat-Signature: uunpfgthh41rnrsm19it378un8c4a79p X-HE-Tag: 1626661087-655095 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Replace bitmap_for_each_bit_region() with for_each_set_bitrange() and ~30 times improve bitmap_list_string() with new macro. On top of: https://lore.kernel.org/lkml/YNp3extAkTY8Aocd@yury-ThinkPad/T/ and https://lore.kernel.org/lkml/YNirnaYw1GSxg1jK@yury-ThinkPad/T/ The full series is here: https://github.com/norov/linux/commits/bitmap-20210716 v1: https://lore.kernel.org/patchwork/patch/1455255/ v2: - replace bitmap_for_each_bit_region(); - address comments for bitmap_list_string() rework. Yury Norov (4): mm/percpu: micro-optimize pcpu_is_populated() bitmap: unify find_bit operations lib: bitmap: add performance test for bitmap_print_to_pagebuf vsprintf: rework bitmap_list_string drivers/mmc/host/renesas_sdhi_core.c | 2 +- include/linux/bitmap.h | 41 -------------------- include/linux/find.h | 56 ++++++++++++++++++++++++++++ lib/test_bitmap.c | 37 ++++++++++++++++++ lib/vsprintf.c | 24 ++++-------- mm/percpu.c | 35 ++++++++--------- 6 files changed, 117 insertions(+), 78 deletions(-)