On Wed, Sep 06, 2023 at 05:54:26PM +0300, Andy Shevchenko wrote:
> On Wed, Sep 06, 2023 at 04:40:39PM +0200, Alexander Lobakin wrote:
> > From: Andy Shevchenko
> > Date: Thu, 31 Aug 2023 16:21:30 +0300
> > > On Fri, Aug 25, 2023 at 04:49:07PM +0200, Alexander Lobakin wrote:
> > >> From: Andy
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 patch does
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 core
> >
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 insertions(+), 6
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 selected like this:
isolcpus=all:1/2
Yury Norov (2):
bitmap_parse
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 files changed, 21 insertions(+), 1 deletion
> > > > 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:
> > > > > > Rec
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()
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
> avo
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/adding
* 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 Villemoes
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
/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/bitops
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
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 kernel
a
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
ned 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
tmap.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/find.h
/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/include/asm
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 declarati
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
> > > functional
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.
> >
&g
/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/include/asm
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/find.h
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 Norov
Acked
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
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/bits.h
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
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
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 sc
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 o
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_{first,n
loat-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 Klimov
Signed-off
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 file changed
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 to using fi
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
in/echo N-N:N/N > cpuset.cpus
>root@hackbox:/sys/fs/cgroup/cpuset/foo# cat cpuset.cpus
>15
>
> This was on a 16 core machine with CONFIG_NR_CPUS=16 in .config file.
>
> Note that "N" is a dynamic quantity, and can change scope if the bitmap
> is changed in
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 contributor to
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/find.h
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 ++
1 file
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 | 30
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 changed, 10
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 changed, 17
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
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
tps://www.spinics.net/lists/linux-m68k/msg16945.html
v3: - split kernel and tools code;
- add FAST_PATH config option;
- add BITMAP API section to MAINTAINERS.
Yury Norov (14):
tools: disable -Wno-type-limits
tools: bitmap: sync function declarations with the kernel
arch: rearrange head
On Tue, Feb 16, 2021 at 11:14:23AM +0200, Andy Shevchenko wrote:
> On Mon, Feb 15, 2021 at 01:30:44PM -0800, Yury Norov wrote:
> > [add David Laight ]
> >
> > On Sat, Jan 30, 2021 at 11:17:11AM -0800, Yury Norov wrote:
> > > Bitmap operations are much simpler and f
[add David Laight ]
On Sat, Jan 30, 2021 at 11:17:11AM -0800, Yury Norov wrote:
> Bitmap operations are much simpler and faster in case of small bitmaps
> which fit into a single word. In linux/bitmap.h we have a machinery that
> allows compiler to replace actual function call w
On Wed, Feb 10, 2021 at 06:49:30PM +0200, Andy Shevchenko wrote:
> On Wed, Feb 10, 2021 at 10:58:25AM -0500, Paul Gortmaker wrote:
> > [Re: [PATCH 6/8] lib: bitmap: support "N" as an alias for size of bitmap]
> > On 09/02/2021 (Tue 15:16) Yury Norov wrote:
> >
&g
On Wed, Feb 10, 2021 at 04:23:09PM -0800, Paul E. McKenney wrote:
> On Wed, Feb 10, 2021 at 03:50:07PM -0800, Yury Norov wrote:
> > On Wed, Feb 10, 2021 at 9:57 AM Paul E. McKenney wrote:
> > >
> > > On Wed, Feb 10, 2021 at 06:26:54PM +0200, Andy Shevchenko wrote:
&
On Wed, Feb 10, 2021 at 9:57 AM Paul E. McKenney wrote:
>
> On Wed, Feb 10, 2021 at 06:26:54PM +0200, Andy Shevchenko wrote:
> > On Tue, Feb 09, 2021 at 05:58:59PM -0500, Paul Gortmaker wrote:
> > > The basic objective here was to add support for "nohz_full=8-N" and/or
> > > "rcu_nocbs="4-N" --
d 47 with "N" and let the system substitute in the actual number at
> boot; a number that it knows better than we do.
>
> Cc: Yury Norov
> Cc: Peter Zijlstra
> Cc: "Paul E. McKenney"
> Cc: Rasmus Villemoes
> Cc: Andy Shevchenko
> Suggested-by: Yury No
On Mon, Feb 1, 2021 at 5:47 AM Andy Shevchenko
wrote:
>
> On Sat, Jan 30, 2021 at 11:17:17AM -0800, Yury Norov wrote:
> > lib/find_bit.c declares five single-line wrappers for _find_next_bit().
> > We may turn those wrappers to inline functions. It eliminates unneeded
> >
On Mon, Feb 1, 2021 at 5:45 AM Andy Shevchenko
wrote:
>
> On Sat, Jan 30, 2021 at 11:17:16AM -0800, 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
Jan 30, 2021 at 11:17:18AM -0800, Yury Norov wrote:
> > > > Similarly to bitmap functions, find_next_*_bit() users will benefit
> > > > if we'll handle a case of bitmaps that fit into a single word. In the
> > > > very best case, the compiler may repla
Similarly to bitmap functions, find_next_*_bit() users will benefit
if we'll handle a case of bitmaps that fit into a single word. In the
very best case, the compiler may replace a function call with a
single ffs or ffz instruction.
Signed-off-by: Yury Norov
---
include/asm-generic/bitops
1 - 100 of 1971 matches
Mail list logo