Thanks for review and testing, Nick!
On Wed, Feb 05, 2025 at 05:00:23PM -0600, Nick Child wrote:
> On Tue, Jan 28, 2025 at 11:46:31AM -0500, Yury Norov wrote:
> > The inner loop may be replaced with the dedicated for_each_online_cpu_wrap.
> > It helps to avoid setting the same bi
On Mon, Feb 10, 2025 at 11:35:48AM -0800, John Hubbard wrote:
> On 2/9/25 11:54 PM, Geert Uytterhoeven wrote:
> > On Sat, 8 Feb 2025 at 18:53, Yury Norov wrote:
> > > On Fri, Feb 07, 2025 at 03:14:01PM -0500, Tamir Duberstein wrote:
> > > > On 7/27/24 12:35 AM, Shuah
n
OK, 7 years is enough to drop it. Adding in bitmap-for-next for
testing.
Thanks,
Yury
> ---
> lib/test_bitmap.c | 28
> 1 file changed, 28 deletions(-)
>
> diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
> index 65a75d58ed9e..c83829ef557f 1
nded to be run by both developers and users, but I find
> no evidence that bitmap in particular would ever provide additional
> value when run by users.
This is my evidence: sometimes people report performance or whatever
issues on their systems, suspecting bitmaps guilty. I ask them to r
The inner loop may be replaced with the dedicated for_each_online_cpu_wrap.
It helps to avoid setting the same bits in the @mask more than once, in
case of group_size is greater than number of online CPUs.
CC: Nick Child
Signed-off-by: Yury Norov
---
drivers/net/virtio_net.c | 12
o the msi_msg */
> + if (handle->idev->igroup->sw_msi_start == PHYS_ADDR_MAX)
> + return 0;
> +
> + ictx = handle->idev->ictx;
> + guard(mutex)(&ictx->sw_msi_lock);
> + /*
> + * The input msi_addr is the exact byte offs
The inner loop may be replaced with the dedicated for_each_online_cpu_wrap.
It helps to avoid setting the same bits in the @mask more than once, in
case of group_size is greater than number of online CPUs.
Signed-off-by: Yury Norov
---
drivers/net/virtio_net.c | 12 +++-
include/linux
> using more fields from the kernel_clone_args we pass that into the
> shadow stack code rather than individual fields.
>
> Portions of the x86 architecture code were written by Rick Edgecombe.
>
> Signed-off-by: Mark Brown
Acked-by: Yury Khrustalev
> @@
by: Mark Brown
> ---
> Documentation/userspace-api/index.rst| 1 +
> Documentation/userspace-api/shadow_stack.rst | 42
> ++++
> 2 files changed, 43 insertions(+)
Acked-by: Yury Khrustalev
ubstantial question is picking the ABI for
> specifying the shadow stack.
I will need more time to review this as both my primary and shadow stacks
are full with other work. At a glance, I cannot offer any informed opinion
for choosing ABI atm. Apologies for the delay.
Kind regards,
Yury
ter to the token.
My preference would be to avoid having obscure additional arguments that may
end up
having misleading name or bear some hidden functionality. If kernel is not
going to
use stack size as such, then users should not have to provide it.
Thanks,
Yury
PS Apologies for delayed reply
t; > >> Maybe symmetrical change in tools/ like I did[0] an aeon ago?
> > >
> > > Hmm... Why can't you simply upstream your version? It seems better than
> > > mine.
> >
> > It was a part of the Netlink bigint API which is a bit on hold for
eue->type, gets NULL back, and
crashes.
Address this by adding efx_get_tx_queue_by_type() and updating
relevant callers.
Signed-off-by: Yury Vostrikov
---
drivers/net/ethernet/sfc/net_driver.h | 21 ++---
drivers/net/ethernet/sfc/ptp.c| 2 +-
drivers/net/ethernet/sfc/t
On Tue, Apr 20, 2021 at 01:18:40PM +0300, Andy Shevchenko wrote:
> On Mon, Apr 19, 2021 at 05:01:31PM -0700, Yury Norov wrote:
> > The 'all' semantics is now supported by the bitmap_parselist() so we can
> > drop supporting it as a special case in RCU code. This p
On Tue, Apr 20, 2021 at 01:17:52PM +0300, Andy Shevchenko wrote:
> On Mon, Apr 19, 2021 at 05:01:30PM -0700, Yury Norov wrote:
> > RCU code supports an 'all' group as a special case when parsing
> > rcu_nocbs parameter. This patch moves the 'all' support to the
The 'all' semantics is now supported by the bitmap_parselist() so we can
drop supporting it as a special case in RCU code. This patch does not
add any functional changes for existing users.
Signed-off-by: Yury Norov
---
kernel/rcu/tree_plugin.h | 9 +++--
1 file changed, 3 insert
reasonable to support it in core bitmap code as a
common and easy-readable alias for '0-N'.
Moving the 'all' support to core bitmap code adds another level of
flexibility for system configuration by supporting patterns. For example,
every second bit in cpumask may be selecte
to
pass patterns together with 'all' in regular group:pattern format
Signed-off-by: Yury Norov
---
Documentation/admin-guide/kernel-parameters.rst | 5 +
lib/bitmap.c| 9 +
lib/test_bitmap.c | 8 +++-
3 fil
> > > > Em Tue, 13 Apr 2021 21:40:20 -0700
> > > > Yury Norov escreveu:
> > > >
> > > > > Ping?
> > > > >
> > > > > On Fri, Apr 09, 2021 at 01:43:04PM -0700, Yury Norov wrote:
> > > > > > Recent
On Wed, Apr 14, 2021 at 08:14:22AM +0200, Mauro Carvalho Chehab wrote:
> Em Tue, 13 Apr 2021 21:40:20 -0700
> Yury Norov escreveu:
>
> > Ping?
> >
> > On Fri, Apr 09, 2021 at 01:43:04PM -0700, Yury Norov wrote:
> > > Recently added memfd_secret() syscall h
Ping?
On Fri, Apr 09, 2021 at 01:43:04PM -0700, Yury Norov wrote:
> Recently added memfd_secret() syscall had a flags parameter passed
> as unsigned long, which requires creation of compat entry for it.
> It was possible to change the type of flags to unsigned int and so
> avoid bo
Documentation/process/adding-syscalls.rst doesn't point clearly about
preference of ABI-agnostic types. This patch adds such notification.
Signed-off-by: Yury Norov
---
Documentation/process/adding-syscalls.rst | 7 +++
1 file changed, 7 insertions(+)
diff --git a/Documentation/process/a
* bitmap_onto - translate one bitmap relative to another
> * @dst: resulting translated bitmap
> --
> 2.30.2
Acked-by: Yury Norov
in find.h requires ffs/fls. Reordering the headers inclusion
sequence helps to prevent compile-time implicit function declaration error.
v2: change wording in the comment.
Reported-by: kernel test robot
Reported-by: Guenter Roeck
Reviewed-by: Andy Shevchenko
Signed-off-by: Yury Norov
---
On Tue, Apr 06, 2021 at 09:03:27AM -0700, Guenter Roeck wrote:
> On Mon, Mar 15, 2021 at 06:54:22PM -0700, Yury Norov wrote:
> > Similarly to bitmap functions, users would benefit if we'll handle
> > a case of small-size bitmaps that fit into a single word.
> >
quires ffs/fls. Reordering the headers inclusion
sequence helps to prevent compile-time implicit function declaration error.
Reported-by: kernel test robot
Signed-off-by: Yury Norov
---
arch/h8300/include/asm/bitops.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/
Add myself as maintainer for bitmap API and Andy and Rasmus as reviewers.
Signed-off-by: Yury Norov
Acked-by: Andy Shevchenko
Acked-by: Rasmus Villemoes
---
MAINTAINERS | 16
1 file changed, 16 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index bbd4484b5ba6
lib/find_bit.c declares five single-line wrappers for _find_next_bit().
We may turn those wrappers to inline functions. It eliminates unneeded
function calls and opens room for compile-time optimizations.
Signed-off-by: Yury Norov
Acked-by: Rasmus Villemoes
---
include/asm-generic/bitops
Sync implementation with the kernel and move the macro from
tools/include/linux/bitmap.h to tools/include/asm-generic/bitsperlong.h
Signed-off-by: Yury Norov
Acked-by: Rasmus Villemoes
---
tools/include/asm-generic/bitsperlong.h | 3 +++
tools/include/linux/bitmap.h| 3 ---
2 files
Similarly to bitmap functions, users would benefit if we'll handle
a case of small-size bitmaps that fit into a single word.
While here, move the find_last_bit() declaration to bitops/find.h
where other find_*_bit() functions sit.
Signed-off-by: Yury Norov
Acked-by: Rasmus Vill
Add fast paths to find_*_bit() functions as per kernel implementation.
Signed-off-by: Yury Norov
Acked-by: Rasmus Villemoes
---
tools/include/asm-generic/bitops/find.h | 58 +++--
tools/lib/find_bit.c| 4 +-
2 files changed, 57 insertions(+), 5
: 233/176 up/down: 5780/-6768 (-988)
Signed-off-by: Yury Norov
Acked-by: Rasmus Villemoes
---
include/asm-generic/bitops/find.h | 30 ++
include/asm-generic/bitops/le.h | 21 +
2 files changed, 51 insertions(+)
diff --git a/include/asm-generic/b
Sync the implementation with recent kernel changes.
Signed-off-by: Yury Norov
Acked-by: Rasmus Villemoes
---
tools/include/asm-generic/bitops/find.h | 27 ++---
tools/lib/find_bit.c| 52 ++---
2 files changed, 42 insertions(+), 37 deletions
m68k and sh include bitmap/{find,le}.h prior to ffs/fls headers. New
fast-path implementation in find.h requires ffs/fls. Reordering the
headers inclusion sequence helps to prevent compile-time implicit
function declaration error.
Signed-off-by: Yury Norov
Acked-by: Geert Uytterhoeven
Acked-by
find_bit would also benefit from small_const_nbits() optimizations.
The detailed comment is provided by Rasmus Villemoes.
Suggested-by: Rasmus Villemoes
Signed-off-by: Yury Norov
Acked-by: Rasmus Villemoes
---
include/asm-generic/bitsperlong.h | 12
include/linux/bitmap.h
rch/20210321215457.588554-1-yury.no...@gmail.com/T/
v6: - sync small_const_nbits() properly (patch 6).
- Rasmus' ack added.
Yury Norov (12):
tools: disable -Wno-type-limits
tools: bitmap: sync function declarations with the kernel
tools: sync BITMAP_LAST_WORD_MASK() macro with the kerne
GENMASK(h, l) may be passed with unsigned types. In such case, type-limits
warning is generated for example in case of GENMASK(h, 0).
Signed-off-by: Yury Norov
Acked-by: Rasmus Villemoes
---
tools/scripts/Makefile.include | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/scripts
Kernel version generates better code.
Signed-off-by: Yury Norov
Acked-by: Rasmus Villemoes
---
tools/include/linux/bitmap.h | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/tools/include/linux/bitmap.h b/tools/include/linux/bitmap.h
index 7cbd23e56d48..4aabc23ec747
Some functions in tools/include/linux/bitmap.h declare nbits as int. In the
kernel nbits is declared as unsigned int.
Signed-off-by: Yury Norov
Acked-by: Rasmus Villemoes
---
tools/include/linux/bitmap.h | 8
tools/lib/bitmap.c | 4 ++--
2 files changed, 6 insertions(+), 6
int, but not true for unsigned long or pointer.
>
> That's why I suggest using unsigned int and so avoid creating compat
> entry point.
>
> Use unsigned int as the type of the flags parameter in memfd_secret()
> system call.
>
> Signed-off-by: Mike Rapoport
Acked-by: Yury Norov
p.h followed by replacing kernel.h with limits.h.
>
> Signed-off-by: Andy Shevchenko
Can you give an example of such dependency?
Nevertheless,
Acked-by: Yury Norov
> ---
> include/linux/align.h | 15 +++
> include/linux/bitmap.h | 3 ++-
> include/linux/kernel.h
On Mon, Mar 22, 2021 at 09:34:47AM +0100, Rasmus Villemoes wrote:
> On 21/03/2021 22.54, Yury Norov wrote:
> > Move the macro from tools/include/asm-generic/bitsperlong.h
> > to tools/include/linux/bitmap.h
>
> The patch does it the other way around :)
>
>
Add fast paths to find_*_bit() functions as per kernel implementation.
Signed-off-by: Yury Norov
---
tools/include/asm-generic/bitops/find.h | 58 +++--
tools/lib/find_bit.c| 4 +-
2 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/tools
Add myself as maintainer for bitmap API and Andy and Rasmus as reviewers.
Signed-off-by: Yury Norov
Acked-by: Andy Shevchenko
Acked-by: Rasmus Villemoes
---
MAINTAINERS | 16
1 file changed, 16 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 38ee5c1a7c3a
lib/find_bit.c declares five single-line wrappers for _find_next_bit().
We may turn those wrappers to inline functions. It eliminates unneeded
function calls and opens room for compile-time optimizations.
Signed-off-by: Yury Norov
---
include/asm-generic/bitops/find.h | 28
Similarly to bitmap functions, users would benefit if we'll handle
a case of small-size bitmaps that fit into a single word.
While here, move the find_last_bit() declaration to bitops/find.h
where other find_*_bit() functions sit.
Signed-off-by: Yury Norov
---
include/asm-generic/bitops/f
: 233/176 up/down: 5780/-6768 (-988)
Signed-off-by: Yury Norov
---
include/asm-generic/bitops/find.h | 30 ++
include/asm-generic/bitops/le.h | 21 +
2 files changed, 51 insertions(+)
diff --git a/include/asm-generic/bitops/find.h
b/includ
Sync the implementation with recent kernel changes.
Signed-off-by: Yury Norov
---
tools/include/asm-generic/bitops/find.h | 27 ++---
tools/lib/find_bit.c| 52 ++---
2 files changed, 42 insertions(+), 37 deletions(-)
diff --git a/tools/include
GENMASK(h, l) may be passed with unsigned types. In such case, type-limits
warning is generated for example in case of GENMASK(h, 0).
Signed-off-by: Yury Norov
---
tools/scripts/Makefile.include | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/scripts/Makefile.include b/tools/scripts
Some functions in tools/include/linux/bitmap.h declare nbits as int. In the
kernel nbits is declared as unsigned int.
Signed-off-by: Yury Norov
Acked-by: Rasmus Villemoes
---
tools/include/linux/bitmap.h | 8
tools/lib/bitmap.c | 4 ++--
2 files changed, 6 insertions(+), 6
find_bit would also benefit from small_const_nbits() optimizations.
The detailed comment is provided by Rasmus Villemoes.
Signed-off-by: Yury Norov
Suggested-by: Rasmus Villemoes
---
include/asm-generic/bitsperlong.h | 12
include/linux/bitmap.h| 8
2 files
m68k and sh include bitmap/{find,le}.h prior to ffs/fls headers. New
fast-path implementation in find.h requires ffs/fls. Reordering the
headers inclusion sequence helps to prevent compile-time implicit
function declaration error.
Signed-off-by: Yury Norov
Acked-by: Geert Uytterhoeven
---
arch
Move the macro from tools/include/asm-generic/bitsperlong.h
to tools/include/linux/bitmap.h
Signed-off-by: Yury Norov
---
tools/include/asm-generic/bitsperlong.h | 3 +++
tools/include/linux/bitmap.h| 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools
Kernel version generates better code.
Signed-off-by: Yury Norov
---
tools/include/linux/bitmap.h | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/tools/include/linux/bitmap.h b/tools/include/linux/bitmap.h
index 7cbd23e56d48..4aabc23ec747 100644
--- a/tools/include
tps://www.spinics.net/lists/kernel/msg3837020.html
v4:
https://patchwork.kernel.org/project/linux-sh/cover/20210316015424.1999082-1-yury.no...@gmail.com/
v5: - drop BITS_{FIRST,LAST} patch;
- minor changes.
Yury Norov (12):
tools: disable -Wno-type-limits
tools: bitmap: sync function declarations with
On Wed, Mar 17, 2021 at 08:58:04PM +0100, Rasmus Villemoes wrote:
> On 17/03/2021 06.40, Yury Norov wrote:
> > On Tue, Mar 16, 2021 at 01:42:45PM +0200, Andy Shevchenko wrote:
>
> >>> It would also be much easier to review if you just redefined the
> >>> BITMAP
On Wed, Mar 17, 2021 at 07:40:04AM +0100, Lukas Bulwahn wrote:
> On Wed, Mar 17, 2021 at 5:57 AM Joe Perches wrote:
> >
> > On Tue, 2021-03-16 at 21:47 -0700, Yury Norov wrote:
> > > [CC Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn]
> > >
> &g
On Tue, Mar 16, 2021 at 01:42:45PM +0200, Andy Shevchenko wrote:
> On Tue, Mar 16, 2021 at 09:35:35AM +0100, Rasmus Villemoes wrote:
> > On 16/03/2021 02.54, Yury Norov wrote:
> > > BITMAP_{LAST,FIRST}_WORD_MASK() in linux/bitmap.h duplicates the
> > > functionality
On Tue, Mar 16, 2021 at 09:56:49AM +0100, Rasmus Villemoes wrote:
> On 16/03/2021 02.54, Yury Norov wrote:
> > find_bit would also benefit from small_const_nbits() optimizations.
> >
> > Signed-off-by: Yury Norov
> > ---
> > include/asm-generic/bitsperlong.h
[CC Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn]
On Tue, Mar 16, 2021 at 01:45:51PM +0200, Andy Shevchenko wrote:
> On Mon, Mar 15, 2021 at 06:54:24PM -0700, Yury Norov wrote:
> > Add myself as maintainer for bitmap API and Andy and Rasmus as reviewers.
> >
>
: 233/176 up/down: 5780/-6768 (-988)
Signed-off-by: Yury Norov
---
include/asm-generic/bitops/find.h | 30 ++
include/asm-generic/bitops/le.h | 21 +
2 files changed, 51 insertions(+)
diff --git a/include/asm-generic/bitops/find.h
b/includ
Add fast paths to find_*_bit() functions as per kernel implementation.
Signed-off-by: Yury Norov
---
tools/include/asm-generic/bitops/find.h | 58 +++--
tools/lib/find_bit.c| 4 +-
2 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/tools
Similarly to bitmap functions, users would benefit if we'll handle
a case of small-size bitmaps that fit into a single word.
While here, move the find_last_bit() declaration to bitops/find.h
where other find_*_bit() functions sit.
Signed-off-by: Yury Norov
---
include/asm-generic/bitops/f
Add myself as maintainer for bitmap API and Andy and Rasmus as reviewers.
I'm an author of current implementation of lib/find_bit and an active
contributor to lib/bitmap. It was spotted that there's no maintainer for
bitmap API. I'm willing to maintain it.
Signed-off-by: Yury
lib/find_bit.c declares five single-line wrappers for _find_next_bit().
We may turn those wrappers to inline functions. It eliminates unneeded
function calls and opens room for compile-time optimizations.
Signed-off-by: Yury Norov
---
include/asm-generic/bitops/find.h | 28
Remove BITMAP_{FIRST,LAST}_WORD_MASK and introduce
BITS_{FIRST,LAST}{,_MASK} as per kernel implementation.
Signed-off-by: Yury Norov
---
tools/include/linux/bitmap.h | 20 ++--
tools/include/linux/bits.h| 6 ++
tools/lib/bitmap.c| 6
Move the macro from tools/include/asm-generic/bitsperlong.h
to tools/include/linux/bitmap.h
Signed-off-by: Yury Norov
---
tools/include/asm-generic/bitsperlong.h | 3 +++
tools/include/linux/bitmap.h| 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools
Sync the implementation with recent kernel changes.
Signed-off-by: Yury Norov
---
tools/include/asm-generic/bitops/find.h | 27 ++---
tools/lib/find_bit.c| 52 ++---
2 files changed, 42 insertions(+), 37 deletions(-)
diff --git a/tools/include
find_bit would also benefit from small_const_nbits() optimizations.
Signed-off-by: Yury Norov
---
include/asm-generic/bitsperlong.h | 9 +
include/linux/bitmap.h| 3 ---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/include/asm-generic/bitsperlong.h
b
_198c 8 - -8
Total: Before=26092016, After=26092017, chg +0.00%
The compilerr is:
aarch64-linux-gnu-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425
Signed-off-by: Yury Norov
---
include/linux/bitmap.h | 27 ---
include/linux/b
GENMASK(h, l) may be passed with unsigned types. In such case, type-limits
warning is generated for example in case of GENMASK(h, 0).
Signed-off-by: Yury Norov
---
tools/scripts/Makefile.include | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/scripts/Makefile.include b/tools/scripts
Some functions in tools/include/linux/bitmap.h declare nbits as int. In the
kernel nbits is declared as unsigned int.
Signed-off-by: Yury Norov
---
tools/include/linux/bitmap.h | 8
tools/lib/bitmap.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a
m68k and sh include bitmap/{find,le}.h prior to ffs/fls headers. New
fast-path implementation in find.h requires ffs/fls. Reordering the
headers inclusion sequence helps to prevent compile-time implicit
function declaration error.
Signed-off-by: Yury Norov
Acked-by: Geert Uytterhoeven
---
arch
TMAP API.
Yury Norov (13):
tools: disable -Wno-type-limits
tools: bitmap: sync function declarations with the kernel
arch: rearrange headers inclusion order in asm/bitops for m68k and sh
lib: introduce BITS_{FIRST,LAST} macro
tools: sync BITS_MASK macros with the kernel
lib: extend the
On Fri, Mar 12, 2021 at 10:12:22AM +0100, Rasmus Villemoes wrote:
> On 12/03/2021 06.28, Yury Norov wrote:
> > On Fri, Feb 19, 2021 at 12:07:27AM +0100, Rasmus Villemoes wrote:
> >> On 18/02/2021 05.05, Yury Norov wrote:
> >>> Many algorithms become simpler if they ar
On Fri, Feb 19, 2021 at 12:07:27AM +0100, Rasmus Villemoes wrote:
> On 18/02/2021 05.05, Yury Norov wrote:
> > Many algorithms become simpler if they are passed with relatively small
> > input values. One example is bitmap operations when the whole bitmap fits
> > into one wo
On Thu, Feb 18, 2021 at 11:51:43PM +0100, Rasmus Villemoes wrote:
> On 18/02/2021 05.05, Yury Norov wrote:
> > BITMAP_{LAST,FIRST}_WORD_MASK() in linux/bitmap.h duplicates the
> > functionality of GENMASK(). The scope of there macros is wider
> > than just bitmap. This patch
On Thu, Feb 25, 2021 at 02:02:06PM +, Will Deacon wrote:
> On Thu, Feb 25, 2021 at 05:56:59AM -0800, Yury Norov wrote:
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index 31bd885b79eb..5596eab04092 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/
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 wrote:
> >
> > From: Alexander Lobakin
> >
> > MIPS doesn't have architecture-optimized bitsearching functions,
> > like find_{fi
scripts/bloat-o-meter vmlinux vmlinux.ffb
add/remove: 4/1 grow/shrink: 19/251 up/down: 564/-1692 (-1128)
...
Overall, GENERIC_FIND_FIRST_BIT=n is harmful both in terms of performance and
code size, and it's better to have GENERIC_FIND_FIRST_BIT enabled.
Tested-by: Alexey Kli
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
Signed-off-by: Alexander Lobakin
Signed-off-by: Yury Norov
---
arch/mips/Kconfig | 1 +
1 fi
imized code and
saves .text memory:
Alexander Lobakin (1):
MIPS: enable GENERIC_FIND_FIRST_BIT
Yury Norov (1):
arm64: enable GENERIC_FIND_FIRST_BIT
arch/arm64/Kconfig | 1 +
arch/mips/Kconfig | 1 +
2 files changed, 2 insertions(+)
--
2.25.1
On Wed, Feb 24, 2021 at 11:52:55AM +, Alexander Lobakin wrote:
> From: Yury Norov
> Date: Sat, 5 Dec 2020 08:54:06 -0800
>
> Hi,
>
> > ARM64 doesn't implement find_first_{zero}_bit in arch code and doesn't
> > enable it in config. It leads t
On Tue, Dec 08, 2020 at 10:35:50AM +, Will Deacon wrote:
> On Mon, Dec 07, 2020 at 05:59:16PM -0800, Yury Norov wrote:
> > (CC: Alexey Klimov)
> >
> > On Mon, Dec 7, 2020 at 3:25 AM Will Deacon wrote:
> > >
> > > On Sat, Dec 05, 2020 at 08:54:06AM
> This change would enable sysadmins to have a common bootarg across all
> such systems, and would also avoid any off-by-one fencepost errors that
> happen for users who might briefly forget that core counts start at zero.
>
> Originally I did this at the CPU subsys level, but Yu
On Thu, Feb 18, 2021 at 05:15:43PM +0200, Andy Shevchenko wrote:
> On Wed, Feb 17, 2021 at 08:05:06PM -0800, Yury Norov wrote:
> > This series introduces fast paths for find_bit() routines. It is
> > beneficial for typical systems, but those who limited in I-cache
> > m
On Thu, Feb 18, 2021 at 05:28:32PM +0200, Andy Shevchenko wrote:
> On Wed, Feb 17, 2021 at 08:05:12PM -0800, Yury Norov wrote:
> > Add myself as maintainer for bitmap API.
> >
> > I'm an author of current implementation of lib/find_bit and an
> > active contribut
Similarly to bitmap functions, users would benefit if we'll handle
a case of small-size bitmaps that fit into a single word.
While here, move the find_last_bit() declaration to bitops/find.h
where other find_*_bit() functions sit.
Signed-off-by: Yury Norov
---
include/asm-generic/bitops/f
Add fast paths to find_*_bit() functions as per kernel implementation.
Signed-off-by: Yury Norov
---
tools/include/asm-generic/bitops/find.h | 58 +++--
tools/lib/find_bit.c| 4 +-
2 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/tools
Add myself as maintainer for bitmap API.
I'm an author of current implementation of lib/find_bit and an
active contributor to lib/bitmap. It was spotted that there's no
maintainer for bitmap API. I'm willing to maintain it.
Signed-off-by: Yury Norov
---
MAINTAINERS | 14 +++
/ #64
17c: d65f03c0ret
find_next_bit() call is replaced with 6 instructions. (And I suspect
we can improve the GENMASK() for better code generation.) find_next_bit()
itself is 41 instructions.
Signed-off-by: Yury Norov
---
include/asm-generic/bitops/find.h
Sync the implementation with recent kernel changes.
Signed-off-by: Yury Norov
---
tools/include/asm-generic/bitops/find.h | 27 ++---
tools/lib/find_bit.c| 52 ++---
2 files changed, 42 insertions(+), 37 deletions(-)
diff --git a/tools/include
lib/find_bit.c declares five single-line wrappers for _find_next_bit().
We may turn those wrappers to inline functions. It eliminates unneeded
function calls and opens room for compile-time optimizations.
Signed-off-by: Yury Norov
---
include/asm-generic/bitops/find.h | 28
that this is the cumulive effect on already existing fast paths
controlled by SMALL_CONST() together with ones added by this series.
Signed-off-by: Yury Norov
---
include/asm-generic/bitsperlong.h | 4
lib/Kconfig | 7 +++
2 files changed, 11 insertions(+)
diff
optimizations of this sort, like
find_bit API in the following patches. So it looks helpful to generalize
the macro and extend it's visibility.
Signed-off-by: Yury Norov
---
tools/include/asm-generic/bitsperlong.h | 2 ++
tools/include/linux/bitmap.h| 19 ---
2 files change
optimizations of this sort, like
find_bit API in the following patches. So it looks helpful to generalize
the macro and extend it's visibility.
Signed-off-by: Yury Norov
---
include/asm-generic/bitsperlong.h | 2 ++
include/linux/bitmap.h| 33 ++-
2 files change
GENMASK(h, l) may be passed with unsigned types. In such case, type-limits
warning is generated for example in case of GENMASK(h, 0).
Signed-off-by: Yury Norov
---
tools/scripts/Makefile.include | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/scripts/Makefile.include b/tools/scripts
BITMAP_{LAST,FIRST}_WORD_MASK()
to avoid duplication and increase the scope of the macros.
Signed-off-by: Yury Norov
---
include/linux/bitmap.h | 27 ---
include/linux/bits.h| 6 ++
include/linux/cpumask.h | 8
include/linux
Remove BITMAP_{FIRST,LAST}_WORD_MASK and introduce
BITS_{FIRST,LAST}{,_MASK} as per kernel implementation.
Signed-off-by: Yury Norov
---
tools/include/linux/bitmap.h | 20 ++--
tools/include/linux/bits.h| 6 ++
tools/lib/bitmap.c| 6
m68k and sh include bitmap/find.h prior to ffs/fls headers. New fast-path
implementation in find.h requires ffs/fls. Reordering the headers inclusion
sequence helps to prevent compile-time implicit-function-declaration error.
Signed-off-by: Yury Norov
Acked-by: Geert Uytterhoeven
---
arch/m68k
1 - 100 of 1012 matches
Mail list logo