Message ID | 20211001181245.228419-12-yury.norov@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=MEXA=OV=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01335C433FE for <linux-mm@archiver.kernel.org>; Fri, 1 Oct 2021 18:13:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B0BD26127B for <linux-mm@archiver.kernel.org>; Fri, 1 Oct 2021 18:13:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B0BD26127B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 54087940133; Fri, 1 Oct 2021 14:13:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 51988940121; Fri, 1 Oct 2021 14:13:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 390D0940133; Fri, 1 Oct 2021 14:13:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id 29678940121 for <linux-mm@kvack.org>; Fri, 1 Oct 2021 14:13:22 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id DECB98249980 for <linux-mm@kvack.org>; Fri, 1 Oct 2021 18:13:21 +0000 (UTC) X-FDA: 78648665802.12.5ABBEE2 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by imf19.hostedemail.com (Postfix) with ESMTP id 8F5ECB00046A for <linux-mm@kvack.org>; Fri, 1 Oct 2021 18:13:21 +0000 (UTC) Received: by mail-pf1-f177.google.com with SMTP id u7so8622465pfg.13 for <linux-mm@kvack.org>; Fri, 01 Oct 2021 11:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KItrf/8CC1jUWlWikMSRYATLzZeQvXDG/CTBGZDdNyk=; b=hvzO7QUqCKq80JWmczkm9F1XsojfIjsT6sL1BvDhvH3yswXLbSqB14lWUycWwf17Cs paVfPt37iaUgR3aZ7T+AMrC1BChw7Oqpqq57H33vNLmXrrb11VGpILQPPsdw3Db3npKG YbBObDz1hT6+1J2OJmxUytIs/F3NSrfcQtZX2sR2XZUpcvbIGDkgplolWn7Zao4+aY3P nnJjv3/j26hXWVP8GAUelSasST0cBj9n/WGwyvqYVC2+iiMjfj0NYMwKnFf/gu4h8bD0 2DdRLmcVlHtNdrYGNPLPBYhx9CxjMAO7RwbbzM9A2J/2jgv3MCsUU84RLb1z9cUXbrVo AFDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KItrf/8CC1jUWlWikMSRYATLzZeQvXDG/CTBGZDdNyk=; b=d2j8AzAaiRX55/Lzi13IMiO9/MKPtVbgbnvtaSJCSHAWs/Nvxq9FA8LydnoBmahcjZ g2EVMLpNTVd/z4J0LBt6YqsQrszn37JgP7BS9cnTkWMHKJ36pjiPuc+5LKhiw9OoMSj2 fS39FL1S/2htNfI8bcPZiSpIDibfCbDqZ30AtygyUXYT3qCp5xhRY6WYRPbtvW3zSHTl nrp2UOYkG2SRsj2D4dCmPDKAFxnS88aPpjozrxStqhbt7v8uDmeEw3+KPXWsBN5iAzD0 KoELwERPS132wP7MuTlwE7urfIICaZ+s5tj8BEASedDeUgFiMEw4oKYf0DVlVOe9UJkY 0fKg== X-Gm-Message-State: AOAM531hQV1EofgVUTDtDmBBW2zq19TMBhJ4W5YotAxfpt0PxLwwJzd8 7nz2XA1ZOQ4SmvZ2uAq8qxA= X-Google-Smtp-Source: ABdhPJy63QWzYfka9stv8WCp68mZSua/IICcFSjcVwG0FkOdVATEaBbbU7JB45fFwQs/JjJuBnib2w== X-Received: by 2002:a62:7ec4:0:b0:44b:bc4b:844b with SMTP id z187-20020a627ec4000000b0044bbc4b844bmr12986951pfc.48.1633112000495; Fri, 01 Oct 2021 11:13:20 -0700 (PDT) Received: from localhost (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id g9sm6983227pfh.13.2021.10.01.11.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 11:13:20 -0700 (PDT) From: Yury Norov <yury.norov@gmail.com> To: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Yury Norov <yury.norov@gmail.com>, Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mmc@vger.kernel.org, linux-perf-users@vger.kernel.org, kvm@vger.kernel.org, "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>, Alexander Lobakin <alobakin@pm.me>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Alexey Klimov <aklimov@redhat.com>, Andrea Merello <andrea.merello@gmail.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Arnaldo Carvalho de Melo <acme@redhat.com>, Arnd Bergmann <arnd@arndb.de>, Ben Gardon <bgardon@google.com>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Brian Cain <bcain@codeaurora.org>, Catalin Marinas <catalin.marinas@arm.com>, Christoph Lameter <cl@linux.com>, Daniel Bristot de Oliveira <bristot@redhat.com>, David Hildenbrand <david@redhat.com>, Dennis Zhou <dennis@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Heiko Carstens <hca@linux.ibm.com>, Ian Rogers <irogers@google.com>, Ingo Molnar <mingo@redhat.com>, Jaegeuk Kim <jaegeuk@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Jiri Olsa <jolsa@redhat.com>, Joe Perches <joe@perches.com>, Jonas Bonn <jonas@southpole.se>, Leo Yan <leo.yan@linaro.org>, Mark Rutland <mark.rutland@arm.com>, Namhyung Kim <namhyung@kernel.org>, Palmer Dabbelt <palmer@dabbelt.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Petr Mladek <pmladek@suse.com>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, Rich Felker <dalias@libc.org>, Samuel Mendoza-Jonas <sam@mendozajonas.com>, Sean Christopherson <seanjc@google.com>, Sergey Senozhatsky <senozhatsky@chromium.org>, Shuah Khan <shuah@kernel.org>, Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>, Steven Rostedt <rostedt@goodmis.org>, Tejun Heo <tj@kernel.org>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Ulf Hansson <ulf.hansson@linaro.org>, Will Deacon <will@kernel.org>, Wolfram Sang <wsa+renesas@sang-engineering.com>, Yoshinori Sato <ysato@users.sourceforge.jp> Subject: [PATCH 11/16] find: micro-optimize for_each_{set,clear}_bit() Date: Fri, 1 Oct 2021 11:12:40 -0700 Message-Id: <20211001181245.228419-12-yury.norov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211001181245.228419-1-yury.norov@gmail.com> References: <20211001181245.228419-1-yury.norov@gmail.com> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 8F5ECB00046A X-Stat-Signature: agoge9g8yino4f6dn1ncyzwcyq1mco78 Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hvzO7QUq; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf19.hostedemail.com: domain of yury.norov@gmail.com designates 209.85.210.177 as permitted sender) smtp.mailfrom=yury.norov@gmail.com X-HE-Tag: 1633112001-836201 Content-Transfer-Encoding: quoted-printable 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: <linux-mm.kvack.org> |
Series |
Resend bitmap patches
|
expand
|
diff --git a/include/linux/find.h b/include/linux/find.h index 4500e8ab93e2..ae9ed52b52b8 100644 --- a/include/linux/find.h +++ b/include/linux/find.h @@ -280,7 +280,7 @@ unsigned long find_next_bit_le(const void *addr, unsigned #endif #define for_each_set_bit(bit, addr, size) \ - for ((bit) = find_first_bit((addr), (size)); \ + for ((bit) = find_next_bit((addr), (size), 0); \ (bit) < (size); \ (bit) = find_next_bit((addr), (size), (bit) + 1)) @@ -291,7 +291,7 @@ unsigned long find_next_bit_le(const void *addr, unsigned (bit) = find_next_bit((addr), (size), (bit) + 1)) #define for_each_clear_bit(bit, addr, size) \ - for ((bit) = find_first_zero_bit((addr), (size)); \ + for ((bit) = find_next_zero_bit((addr), (size), 0); \ (bit) < (size); \ (bit) = find_next_zero_bit((addr), (size), (bit) + 1))