public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] bitmap: introduce bitmap_weight_from()
@ 2025-07-20  1:41 Yury Norov
  2025-07-20  1:41 ` [PATCH 1/2] bitmap: add bitmap_weight_from() Yury Norov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Yury Norov @ 2025-07-20  1:41 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
	H. Peter Anvin, Rasmus Villemoes, Andrew Morton,
	Peter Zijlstra (Intel), Ilpo Järvinen,
	Fernando Fernandez Mancera, Xin Li (Intel), x86, linux-kernel
  Cc: Yury Norov

From: Yury Norov (NVIDIA) <yury.norov@gmail.com>

Introduce bitmap_weight_from() and use it in topo_unit_count()

Yury Norov (2):
  bitmap: introduce bitmap_weight_from()
  x86: topology: simplify topo_unit_count()

 arch/x86/kernel/cpu/topology.c |  9 ++-------
 include/linux/bitmap.h         | 11 +++++++++++
 lib/bitmap.c                   | 28 ++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 7 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 0/2] x86/topology: add bitmap_weight_from() and use it in topo_unit_count()
@ 2025-12-14 23:54 Yury Norov (NVIDIA)
  2025-12-14 23:54 ` [PATCH 1/2] bitmap: add bitmap_weight_from() Yury Norov (NVIDIA)
  0 siblings, 1 reply; 7+ messages in thread
From: Yury Norov (NVIDIA) @ 2025-12-14 23:54 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Yury Norov, Rasmus Villemoes, Andrew Morton,
	Peter Zijlstra (Intel), Ilpo Järvinen, Tony Luck,
	Xin Li (Intel), Chang S. Bae, linux-kernel

Currently the function open-codes the missing bitmap_weight_from() with
a for-loop, which is known to be less effective. Add the helper and
switch topo_unit_count() to using it.

Yury Norov (NVIDIA) (2):
  bitmap: add bitmap_weight_from()
  topology: use bitmap_weight_from()

 arch/x86/kernel/cpu/topology.c |  8 ++------
 include/linux/bitmap.h         | 25 +++++++++++++++++++++++++
 lib/bitmap.c                   | 28 ++++++++++++++++++++++++++++
 lib/test_bitmap.c              | 29 +++++++++++++++++++++++++++++
 4 files changed, 84 insertions(+), 6 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-12-15  7:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-20  1:41 [PATCH 0/2] bitmap: introduce bitmap_weight_from() Yury Norov
2025-07-20  1:41 ` [PATCH 1/2] bitmap: add bitmap_weight_from() Yury Norov
2025-07-20 10:44   ` Thomas Gleixner
2025-07-20  1:41 ` [PATCH 2/2] x86: topology: simplify topo_unit_count() Yury Norov
2025-07-21 15:30 ` [PATCH 0/2] bitmap: introduce bitmap_weight_from() Dave Hansen
  -- strict thread matches above, loose matches on Subject: below --
2025-12-14 23:54 [PATCH 0/2] x86/topology: add bitmap_weight_from() and use it in topo_unit_count() Yury Norov (NVIDIA)
2025-12-14 23:54 ` [PATCH 1/2] bitmap: add bitmap_weight_from() Yury Norov (NVIDIA)
2025-12-15  6:59   ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox