Re: [PATCH 3/9] all: replace bitmap_weigth() with bitmap_{empty,full,eq,gt,le}
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Yury Norov <yury.norov@xxxxxxxxx>
- Subject: Re: [PATCH 3/9] all: replace bitmap_weigth() with bitmap_{empty,full,eq,gt,le}
- From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
- Date: Sun, 28 Nov 2021 09:01:41 +0100
- Cc: linux-kernel@xxxxxxxxxxxxxxx, "James E.J. Bottomley" <jejb@xxxxxxxxxxxxx>, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, "Paul E. McKenney" <paulmck@xxxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>, Alexey Klimov <aklimov@xxxxxxxxxx>, Amitkumar Karwar <amitkarwar@xxxxxxxxx>, Andi Kleen <ak@xxxxxxxxxxxxxxx>, Andrew Lunn <andrew@xxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Andy Gross <agross@xxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Andy Shevchenko <andy@xxxxxxxxxxxxx>, Anup Patel <anup.patel@xxxxxxx>, Ard Biesheuvel <ardb@xxxxxxxxxx>, Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Christoph Hellwig <hch@xxxxxx>, Christoph Lameter <cl@xxxxxxxxx>, Daniel Vetter <daniel@xxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, David Airlie <airlied@xxxxxxxx>, David Laight <David.Laight@xxxxxxxxxx>, Dennis Zhou <dennis@xxxxxxxxxx>, Dinh Nguyen <dinguyen@xxxxxxxxxx>, Geetha sowjanya <gakula@xxxxxxxxxxx>, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, Hans de Goede <hdegoede@xxxxxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>, Ian Rogers <irogers@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Jason Wessel <jason.wessel@xxxxxxxxxxxxx>, Jens Axboe <axboe@xxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>, Jonathan Cameron <jic23@xxxxxxxxxx>, Juri Lelli <juri.lelli@xxxxxxxxxx>, Kalle Valo <kvalo@xxxxxxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxx>, Lee Jones <lee.jones@xxxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Marcin Wojtas <mw@xxxxxxxxxxxx>, Mark Gross <markgross@xxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Matti Vaittinen <mazziesaccount@xxxxxxxxx>, Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>, Mel Gorman <mgorman@xxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Mike Marciniszyn <mike.marciniszyn@xxxxxxxxxxxxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Petr Mladek <pmladek@xxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>, Roy Pledge <Roy.Pledge@xxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Saeed Mahameed <saeedm@xxxxxxxxxx>, Sagi Grimberg <sagi@xxxxxxxxxxx>, Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>, Solomon Peachy <pizza@xxxxxxxxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxx>, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Subbaraya Sundeep <sbhatta@xxxxxxxxxxx>, Sudeep Holla <sudeep.holla@xxxxxxx>, Sunil Goutham <sgoutham@xxxxxxxxxxx>, Tariq Toukan <tariqt@xxxxxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ulf Hansson <ulf.hansson@xxxxxxxxxx>, Vincent Guittot <vincent.guittot@xxxxxxxxxx>, Vineet Gupta <vgupta@xxxxxxxxxx>, Viresh Kumar <viresh.kumar@xxxxxxxxxx>, Vivien Didelot <vivien.didelot@xxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, bcm-kernel-feedback-list@xxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-crypto@xxxxxxxxxxxxxxx, linux-csky@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx
- In-reply-to: <20211128035704.270739-4-yury.norov@gmail.com>
- References: <20211128035704.270739-1-yury.norov@gmail.com> <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@xxxxxxxxx>
> ---
> 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
- Prev by Date:
Re: [PATCH 7/9] lib/cpumask: add num_{possible,present,active}_cpus_{eq,gt,le}
- Next by Date:
Re: [PATCH 0/9] lib/bitmap: optimize bitmap_weight() usage
- Previous by thread:
Re: [PATCH 3/9] all: replace bitmap_weigth() with bitmap_{empty,full,eq,gt,le}
- Next by thread:
[PATCH 5/9] lib/cpumask: add cpumask_weight_{eq,gt,le}
- Index(es):
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]