Re: [PATCH v4 00/40] lib/find: add atomic find_bit() primitives

2024-06-20 Thread Yury Norov
On Thu, Jun 20, 2024 at 12:26:18PM -0700, Linus Torvalds wrote: > On Thu, 20 Jun 2024 at 11:32, Yury Norov wrote: > > > > Is that in master already? I didn't get any email, and I can't find > > anything related in the master branch. > > It's 5d272dd1b

Re: [PATCH v4 00/40] lib/find: add atomic find_bit() primitives

2024-06-20 Thread Yury Norov
On Thu, Jun 20, 2024 at 11:00:38AM -0700, Linus Torvalds wrote: > On Thu, 20 Jun 2024 at 10:57, Yury Norov wrote: > > > > > > The typical lock-protected bit allocation may look like this: > > If it looks like this, then nobody cares. Clearly the user in question &

[PATCH v4 11/40] ath10k: optimize ath10k_snoc_napi_poll()

2024-06-20 Thread Yury Norov
ath10k_snoc_napi_poll() traverses pending_ce_irqs bitmap bit by bit. Simplify it by using for_each_test_and_clear_bit() iterator. Signed-off-by: Yury Norov --- drivers/net/wireless/ath/ath10k/snoc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net

[PATCH v4 01/40] lib/find: add atomic find_bit() primitives

2024-06-20 Thread Yury Norov
C: Bart Van Assche CC: Sergey Shtylyov Signed-off-by: Yury Norov --- MAINTAINERS | 1 + include/linux/find.h| 4 - include/linux/find_atomic.h | 324 lib/find_bit.c | 86 ++ 4 files changed, 411 insertions(+),

[PATCH v4 02/40] lib/find: add test for atomic find_bit() ops

2024-06-20 Thread Yury Norov
Add basic functionality test for new API. Signed-off-by: Yury Norov --- lib/test_bitmap.c | 62 +++ 1 file changed, 62 insertions(+) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index 65a75d58ed9e..405f79dd2266 100644 --- a/lib/test_bitmap.c

[PATCH v4 00/40] lib/find: add atomic find_bit() primitives

2024-06-20 Thread Yury Norov
move new API to separate headers, to not bloat bitmap.h @ Linus; - patch #1: adjust comments to allow returning >= @size; - rebase the series on top of current master. Yury Norov (40): lib/find: add atomic find_bit() primitives lib/find: add test for atomic find_bit() ops l

Re: [PATCH v3 00/35] bitops: add atomic find_bit() operations

2023-12-16 Thread Yury Norov
On Mon, Dec 11, 2023 at 06:27:14PM -0800, Yury Norov wrote: > Add helpers around test_and_{set,clear}_bit() that allow to search for > clear or set bits and flip them atomically. > > The target patterns may look like this: > > for (idx = 0; idx < nbits; idx+

[PATCH v3 11/35] ath10k: optimize ath10k_snoc_napi_poll()

2023-12-11 Thread Yury Norov
ath10k_snoc_napi_poll() traverses pending_ce_irqs bitmap bit by bit. Simplify it by using for_each_test_and_clear_bit() iterator. Signed-off-by: Yury Norov --- drivers/net/wireless/ath/ath10k/snoc.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net

[PATCH v3 02/35] lib/find: add test for atomic find_bit() ops

2023-12-11 Thread Yury Norov
Add basic functionality test for new API. Signed-off-by: Yury Norov --- lib/test_bitmap.c | 61 +++ 1 file changed, 61 insertions(+) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index 65f22c2578b0..277e1ca9fd28 100644 --- a/lib/test_bitmap.c

[PATCH v3 01/35] lib/find: add atomic find_bit() primitives

2023-12-11 Thread Yury Norov
tion with 'for_each'. CC: Bart Van Assche CC: Sergey Shtylyov Signed-off-by: Yury Norov --- include/linux/find.h | 293 +++ lib/find_bit.c | 85 + 2 files changed, 378 insertions(+) diff --git a/include/linux/find.h b/include

[PATCH v3 00/35] bitops: add atomic find_bit() operations

2023-12-11 Thread Yury Norov
@ Vitaly Kuznetsov, Sean Christopherson; Yury Norov (35): lib/find: add atomic find_bit() primitives lib/find: add test for atomic find_bit() ops lib/sbitmap; optimize __sbitmap_get_word() by using find_and_set_bit() watch_queue: optimize post_one_notification() by using find_and_

Re: [PATCH v2 00/35] bitops: add atomic find_bit() operations

2023-12-05 Thread Yury Norov
On Mon, Dec 04, 2023 at 07:51:01PM +0100, Jan Kara wrote: > Hello Yury! > > On Sun 03-12-23 11:23:47, Yury Norov wrote: > > Add helpers around test_and_{set,clear}_bit() that allow to search for > > clear or set bits and flip them atomically. > > > > The t

[PATCH v2 11/35] ath10k: optimize ath10k_snoc_napi_poll() by using find_bit()

2023-12-03 Thread Yury Norov
ath10k_snoc_napi_poll() traverses pending_ce_irqs bitmap bit by bit. We can do it faster by using for_each_test_and_clear_bit() iterator. Signed-off-by: Yury Norov --- drivers/net/wireless/ath/ath10k/snoc.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net

[PATCH v2 02/35] lib/find: add test for atomic find_bit() ops

2023-12-03 Thread Yury Norov
Add basic functionality test for new API. Signed-off-by: Yury Norov --- lib/test_bitmap.c | 61 +++ 1 file changed, 61 insertions(+) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index 65f22c2578b0..277e1ca9fd28 100644 --- a/lib/test_bitmap.c

[PATCH v2 01/35] lib/find: add atomic find_bit() primitives

2023-12-03 Thread Yury Norov
or_each'. All users of find_bit() API, where heavy concurrency is expected, are encouraged to switch to atomic find_and_bit() as appropriate. CC: Bart Van Assche CC: Sergey Shtylyov Signed-off-by: Yury Norov --- include/linux/find.h | 293 +++ lib/fin

[PATCH v2 00/35] bitops: add atomic find_bit() operations

2023-12-03 Thread Yury Norov
atch #13: keep test against stimer->config.enable @ Vitaly Kuznetsov; - Patch #15: use find_and_set_next_bit @ Bart Van Assche; - Patch #31: edit commit message @ Tony Lu, Alexandra Winter; - Patch #35: edit tag @ John Paul Adrian Glaubitz; Yury Norov (35): lib/find: add atomic find_bit() primi

[PATCH 10/34] ath10k: optimize ath10k_snoc_napi_poll() by using find_bit()

2023-11-18 Thread Yury Norov
ath10k_snoc_napi_poll() traverses pending_ce_irqs bitmap bit by bit. We can do it faster by using for_each_test_and_clear_bit() iterator. Signed-off-by: Yury Norov --- drivers/net/wireless/ath/ath10k/snoc.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net

[PATCH 01/34] lib/find: add atomic find_bit() primitives

2023-11-18 Thread Yury Norov
h'. All users of find_bit() API, where heavy concurrency is expected, are encouraged to switch to atomic find_and_bit() as appropriate. Signed-off-by: Yury Norov --- include/linux/find.h | 289 +++ lib/find_bit.c | 85 + 2 files chan

[PATCH 00/34] biops: add atomig find_bit() operations

2023-11-18 Thread Yury Norov
nel. They can be applied separately from each other on per-subsystems basis, or I can pull them in bitmap tree, as appropriate. [1] https://lore.kernel.org/lkml/634f5fdf-e236-42cf-be8d-48a581c21...@alu.unizg.hr/T/#m3e7341eb3571753f3acf8fe166f3fb5b2c12e615 Yury Norov (34): lib/find: add atom