Re: [PATCH] ARM: mm: use bitmap_zero() API

From: Russell King (Oracle)
Date: Sat May 06 2023 - 06:35:44 EST


On Sat, May 06, 2023 at 04:35:22PM +0800, ye.xingchen@xxxxxxxxxx wrote:
> From: Ye Xingchen <ye.xingchen@xxxxxxxxxx>
>
> bitmap_zero() is faster than bitmap_clear(), so use bitmap_zero()
> instead of bitmap_clear().

Maybe in theory, but as NUM_USER_ASIDS is a power of two (256),
and therefore both start and nbits are aigned to BITMAP_MEM_ALIGNMENT,
bitmap_clear() will call memset().

The only difference between the two are that bitmap_zero() doesn't
involve the compiler working out that it can call memset() (which
will be worked out at compile time not run time).

So, I doubt that this change makes any difference what so ever to the
generated code, and thus this change is just for change sake. In
other words, it's just useless churn.

Thanks anyway.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!