mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [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)
  2025-12-14 23:54 ` [PATCH 2/2] x86/topology: use bitmap_weight_from() Yury Norov (NVIDIA)
  0 siblings, 2 replies; 4+ 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] 4+ messages in thread

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2025-12-14 23:54 ` [PATCH 2/2] x86/topology: use bitmap_weight_from() Yury Norov (NVIDIA)

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

all inboxes | Powered by JetHome®