From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Yury Norov <yury.norov@gmail.com>
Cc: linux-kernel@vger.kernel.org,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Alexey Klimov <aklimov@redhat.com>,
Amitkumar Karwar <amitkarwar@gmail.com>,
Andi Kleen <ak@linux.intel.com>, Andrew Lunn <andrew@lunn.ch>,
Andrew Morton <akpm@linux-foundation.org>,
Andy Gross <agross@kernel.org>, Andy Lutomirski <luto@kernel.org>,
Andy Shevchenko <andy@infradead.org>,
Anup Patel <anup.patel@wdc.com>, Ard Biesheuvel <ardb@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Arnd Bergmann <arnd@arndb.de>, Borislav Petkov <bp@alien8.de>,
Catalin Marinas <catalin.marinas@arm.com>,
Christoph Hellwig <hch@lst.de>, Christoph Lameter <cl@linux.com>,
Daniel Vetter <daniel@ffwll.ch>,
Dave
Subject: Re: [PATCH 3/9] all: replace bitmap_weigth() with bitmap_{empty,full,eq,gt,le}
Date: Sun, 28 Nov 2021 09:01:41 +0100 [thread overview]
Message-ID: <YaM3ZeQS4tHzsRkK@kroah.com> (raw)
In-Reply-To: <20211128035704.270739-4-yury.norov@gmail.com>
On Sat, Nov 27, 2021 at 07:56:58PM -0800, Yury Norov wrote:
> bitmap_weight() counts all set bits in the bitmap unconditionally.
> However in some cases we can traverse a part of bitmap when we
> only need to check if number of set bits is greater, less or equal
> to some number.
>
> This patch replaces bitmap_weight() with one of
> bitmap_{empty,full,eq,gt,le), as appropriate.
>
> In some places driver code has been optimized further, where it's
> trivial.
>
> Signed-off-by: Yury Norov <yury.norov@gmail.com>
> ---
> arch/nds32/kernel/perf_event_cpu.c | 4 +---
> arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4 ++--
> arch/x86/kvm/hyperv.c | 8 ++++----
> drivers/crypto/ccp/ccp-dev-v5.c | 5 +----
> drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +-
> drivers/iio/adc/mxs-lradc-adc.c | 3 +--
> drivers/iio/dummy/iio_simple_dummy_buffer.c | 4 ++--
> drivers/iio/industrialio-buffer.c | 2 +-
> drivers/iio/industrialio-trigger.c | 2 +-
> drivers/memstick/core/ms_block.c | 4 ++--
> drivers/net/dsa/b53/b53_common.c | 2 +-
> drivers/net/ethernet/broadcom/bcmsysport.c | 6 +-----
> drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 4 ++--
> drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +-
> .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +-
> .../ethernet/marvell/octeontx2/nic/otx2_flows.c | 8 ++++----
> .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +-
> drivers/net/ethernet/mellanox/mlx4/cmd.c | 10 +++-------
> drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++--
> drivers/net/ethernet/mellanox/mlx4/main.c | 2 +-
> .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +-
> drivers/net/ethernet/qlogic/qed/qed_dev.c | 3 +--
> drivers/net/ethernet/qlogic/qed/qed_rdma.c | 4 ++--
> drivers/net/ethernet/qlogic/qed/qed_roce.c | 2 +-
> drivers/perf/arm-cci.c | 2 +-
> drivers/perf/arm_pmu.c | 4 ++--
> drivers/perf/hisilicon/hisi_uncore_pmu.c | 2 +-
> drivers/perf/thunderx2_pmu.c | 3 +--
> drivers/perf/xgene_pmu.c | 2 +-
> drivers/pwm/pwm-pca9685.c | 2 +-
> drivers/staging/media/tegra-video/vi.c | 2 +-
> drivers/thermal/intel/intel_powerclamp.c | 10 ++++------
> fs/ocfs2/cluster/heartbeat.c | 14 +++++++-------
> 33 files changed, 57 insertions(+), 75 deletions(-)
After you get the new functions added to the kernel tree, this patch
should be broken up into one-patch-per-subsystem and submitted through
the various subsystem trees.
thanks,
greg k-h
next prev parent reply other threads:[~2021-11-28 8:01 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20211128035704.270739-1-yury.norov@gmail.com>
2021-11-28 3:56 ` [PATCH 1/9] lib/bitmap: add bitmap_weight_{eq,gt,le} Yury Norov
2021-11-28 3:56 ` [PATCH 2/9] lib/bitmap: implement bitmap_{empty,full} with bitmap_weight_eq() Yury Norov
2021-11-28 3:56 ` [PATCH 3/9] all: replace bitmap_weigth() with bitmap_{empty,full,eq,gt,le} Yury Norov
2021-11-28 3:56 ` [PATCH 4/9] tools: sync bitmap_weight() usage with the kernel Yury Norov
2021-11-28 3:57 ` [PATCH 5/9] lib/cpumask: add cpumask_weight_{eq,gt,le} Yury Norov
2021-11-28 3:57 ` [PATCH 6/9] lib/nodemask: add nodemask_weight_{eq,gt,le} Yury Norov
2021-11-28 3:57 ` [PATCH 7/9] lib/cpumask: add num_{possible,present,active}_cpus_{eq,gt,le} Yury Norov
2021-11-28 3:57 ` [PATCH 8/9] lib/nodemask: add num_node_state_eq() Yury Norov
2021-11-28 3:57 ` [PATCH 9/9] MAINTAINERS: add cpumask and nodemask files to BITMAP_API Yury Norov
[not found] ` <20211128035704.270739-4-yury.norov@gmail.com>
2021-11-28 4:47 ` [PATCH 3/9] all: replace bitmap_weigth() with bitmap_{empty,full,eq,gt,le} Michał Mirosław
2021-11-28 8:01 ` Greg Kroah-Hartman [this message]
2021-11-28 11:08 ` [PATCH 0/9] lib/bitmap: optimize bitmap_weight() usage Nicholas Piggin
[not found] ` <20211128035704.270739-8-yury.norov@gmail.com>
2021-11-28 4:56 ` [PATCH 7/9] lib/cpumask: add num_{possible,present,active}_cpus_{eq,gt,le} Michał Mirosław
2021-11-28 5:09 ` Michał Mirosław
2021-11-28 6:34 ` Yury Norov
2021-11-28 17:07 ` Joe Perches
[not found] ` <8f389151c39a8a5b6b31d5238cb680305225d9f2.camel@perches.com>
2021-11-28 17:43 ` Yury Norov
2021-11-28 17:54 ` Dennis Zhou
2021-11-28 18:47 ` Yury Norov
2021-11-28 17:56 ` Emil Renner Berthing
2021-11-28 17:57 ` Joe Perches
2021-11-28 18:03 ` [PATCH 0/9] lib/bitmap: optimize bitmap_weight() usage mirq-test
2021-11-29 6:38 ` Yury Norov
2021-11-29 16:34 ` Michał Mirosław
2021-12-02 0:31 ` Yury Norov
[not found] ` <20211128035704.270739-3-yury.norov@gmail.com>
2021-11-28 4:37 ` [PATCH 2/9] lib/bitmap: implement bitmap_{empty,full} with bitmap_weight_eq() Michał Mirosław
2021-11-28 6:27 ` Yury Norov
2021-11-28 18:10 ` Michał Mirosław
2021-12-14 19:43 ` Yury Norov
2021-12-15 8:40 ` David Laight
2021-12-15 17:45 ` Yury Norov
[not found] ` <1638096766.3elxdzb8ly.astroid@bobo.none>
2021-11-28 23:36 ` [PATCH 0/9] lib/bitmap: optimize bitmap_weight() usage Yury Norov
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=YaM3ZeQS4tHzsRkK@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=acme@kernel.org \
--cc=agross@kernel.org \
--cc=ak@linux.intel.com \
--cc=aklimov@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=amitkarwar@gmail.com \
--cc=andrew@lunn.ch \
--cc=andy@infradead.org \
--cc=anup.patel@wdc.com \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=cl@linux.com \
--cc=daniel@ffwll.ch \
--cc=hch@lst.de \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=paulmck@kernel.org \
--cc=rafael@kernel.org \
--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).