public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Yury Norov <yury.norov@gmail.com>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: linux-arch@vger.kernel.org,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Alexander Lobakin <alobakin@pm.me>,
	Catalin Marinas <catalin.marinas@arm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"open list:MIPS" <linux-mips@vger.kernel.org>,
	Alexey Klimov <aklimov@redhat.com>, Will Deacon <will@kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/2] MIPS: enable GENERIC_FIND_FIRST_BIT
Date: Thu, 25 Feb 2021 20:07:08 -0800	[thread overview]
Message-ID: <20210226040708.GA1427525@yury-ThinkPad> (raw)
In-Reply-To: <CAAhV-H5Xt+1c_gCOpudzizurEbVXYonf_wWg9sTaCKWcONEL-Q@mail.gmail.com>

On Fri, Feb 26, 2021 at 09:22:18AM +0800, Huacai Chen wrote:
> Hi, Yury,
> 
> On Thu, Feb 25, 2021 at 9:59 PM Yury Norov <yury.norov@gmail.com> wrote:
> >
> > From: Alexander Lobakin <alobakin@pm.me>
> >
> > MIPS doesn't have architecture-optimized bitsearching functions,
> > like find_{first,next}_bit() etc.
> Emm, I think MIPS can use clo/clz to optimize bitsearching functions.

find_{first,next}_bit() is about manipulating the bitmaps bigger that
a single word, and some arches (arm) implement their own find_bit()
functions. find_bit() is not a replacement of __ffs() and ffz().

> Huacai
> 
> > It's absolutely harmless to enable GENERIC_FIND_FIRST_BIT as this
> > functionality is not new at all and well-tested. It provides more
> > optimized code and saves some .text memory (32 R2):
> >
> > add/remove: 4/1 grow/shrink: 1/53 up/down: 216/-372 (-156)
> >
> > Users of for_each_set_bit() like hotpath gic_handle_shared_int()
> > will also benefit from this.
> >
> > Suggested-by: Yury Norov <yury.norov@gmail.com>
> > Signed-off-by: Alexander Lobakin <alobakin@pm.me>
> > Signed-off-by: Yury Norov <yury.norov@gmail.com>
> > ---
> >  arch/mips/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> > index d89efba3d8a4..164bdd715d4b 100644
> > --- a/arch/mips/Kconfig
> > +++ b/arch/mips/Kconfig
> > @@ -26,6 +26,7 @@ config MIPS
> >         select GENERIC_ATOMIC64 if !64BIT
> >         select GENERIC_CMOS_UPDATE
> >         select GENERIC_CPU_AUTOPROBE
> > +       select GENERIC_FIND_FIRST_BIT
> >         select GENERIC_GETTIMEOFDAY
> >         select GENERIC_IOMAP
> >         select GENERIC_IRQ_PROBE
> > --
> > 2.25.1
> >

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

  reply	other threads:[~2021-02-26  4:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 13:56 [PATCH 0/2] arch: enable GENERIC_FIND_FIRST_BIT for MIPS and ARM64 Yury Norov
2021-02-25 13:56 ` [RESEND PATCH 1/2] ARM64: enable GENERIC_FIND_FIRST_BIT Yury Norov
2021-02-25 14:02   ` Will Deacon
2021-03-03 22:17     ` Yury Norov
2021-03-05 11:20       ` Catalin Marinas
2021-02-25 13:57 ` [PATCH 2/2] MIPS: " Yury Norov
2021-02-26  1:22   ` Huacai Chen
2021-02-26  4:07     ` Yury Norov [this message]
2021-03-01 14:49   ` Thomas Bogendoerfer
2021-03-15 19:14 ` (subset) [PATCH 0/2] arch: enable GENERIC_FIND_FIRST_BIT for MIPS and ARM64 Catalin Marinas

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=20210226040708.GA1427525@yury-ThinkPad \
    --to=yury.norov@gmail.com \
    --cc=aklimov@redhat.com \
    --cc=alobakin@pm.me \
    --cc=catalin.marinas@arm.com \
    --cc=chenhuacai@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=will@kernel.org \
    /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