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: Michał Mirosław <mirq-linux@xxxxxxxxxxxx>
- Date: Sun, 28 Nov 2021 05:47:43 +0100
- Cc: linux-kernel@xxxxxxxxxxxxxxx, 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.
[...]
I think this patch needs to be split. bitmap_full/empty() conversions
can be separated (don't need the bitmap_weight_*() functions) and
not all changes are trivial. Besides, gathering and checking all the
acks needed into one patch seems problematic.
Best Regards,
Michał Mirosław
- Prev by Date:
Re: [PATCH 2/9] lib/bitmap: implement bitmap_{empty,full} with bitmap_weight_eq()
- Next by Date:
Re: [PATCH 7/9] lib/cpumask: add num_{possible,present,active}_cpus_{eq,gt,le}
- Previous by thread:
[PATCH 3/9] all: replace bitmap_weigth() with bitmap_{empty,full,eq,gt,le}
- Next by thread:
Re: [PATCH 3/9] all: replace bitmap_weigth() with bitmap_{empty,full,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]