linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: ye.xingchen@zte.com.cn
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: mm: use bitmap_zero() API
Date: Sat, 6 May 2023 11:35:32 +0100	[thread overview]
Message-ID: <ZFYtdB4KB7+q5tk1@shell.armlinux.org.uk> (raw)
In-Reply-To: <202305061635221161194@zte.com.cn>

On Sat, May 06, 2023 at 04:35:22PM +0800, ye.xingchen@zte.com.cn wrote:
> From: Ye Xingchen <ye.xingchen@zte.com.cn>
> 
> 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!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2023-05-06 10:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06  8:35 [PATCH] ARM: mm: use bitmap_zero() API ye.xingchen
2023-05-06 10:35 ` Russell King (Oracle) [this message]

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=ZFYtdB4KB7+q5tk1@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ye.xingchen@zte.com.cn \
    /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).