mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tzu-Ching Yang <shingekinocore@gmail.com>
To: Yury Norov <ynorov@nvidia.com>, Guo Ren <guoren@kernel.org>
Cc: linux-csky@vger.kernel.org, Yury Norov <yury.norov@gmail.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] csky: bitops: Use the compiler builtin for __fls()
Date: Thu, 29 Oct 2026 11:46:58 +0800	[thread overview]
Message-ID: <20261029034658.3137810-1-shingekinocore@gmail.com> (raw)
In-Reply-To: <auIQ2RI89C374je2@yury>

On Wed, Oct 28, 2026 at 11:12:45AM -0400, Yury Norov wrote:
> I wonder why the older GCC works better... Can you make sure its the
> same kernel version and the config?

Same tree and config: both tables compare csky/linux-next at
abb81e5ce7d9 before and after the patch, with csky defconfig (CK807),
built with kernel.org GCC 12.5 for one table and GCC 16.2 for the other.
The .config files are identical except for the toolchain-derived symbols
(CONFIG_CC_VERSION_TEXT, CONFIG_GCC_VERSION, CONFIG_AS_VERSION,
CONFIG_LD_VERSION and CONFIG_CC_HAS_*).

The Before totals differ because GCC 16 emits more code than GCC 12 for
this config, with or without the patch. __fls() itself compiles to the
same 4 instructions (8 bytes) with GCC 9 to 16, before and after.

> Anyways the numbers show that the switch to the generic implementation
> is worth to try. I've added the numbers to the commit message and
> pushed in bitmap-for-next for testing.
> 
> Conditionally on the (so far, missing) csky engineers feedback.

Thanks for picking it up.

Tzu-Ching

      reply	other threads:[~2026-10-29  3:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 11:59 Tzu-Ching Yang
2026-10-22 19:41 ` Yury Norov
2026-10-23 14:08   ` Tzu-Ching Yang
2026-10-23 15:45     ` Yury Norov
2026-10-27  6:23       ` Tzu-Ching Yang
2026-10-28 15:12         ` Yury Norov
2026-10-29  3:46           ` Tzu-Ching Yang [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=20261029034658.3137810-1-shingekinocore@gmail.com \
    --to=shingekinocore@gmail.com \
    --cc=arnd@arndb.de \
    --cc=guoren@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=ynorov@nvidia.com \
    --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

all inboxes | Powered by JetHome®