[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250427185242.221974-1-yury.norov@gmail.com>
Date: Sun, 27 Apr 2025 14:52:27 -0400
From: Yury Norov <yury.norov@...il.com>
To: Reinette Chatre <reinette.chatre@...el.com>,
James Morse <james.morse@....com>
Cc: "Yury Norov [NVIDIA]" <yury.norov@...il.com>,
Tony Luck <tony.luck@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/4] cpumask: add missing API and simplify cpumask_any_housekeeping()
From: Yury Norov [NVIDIA] <yury.norov@...il.com>
cpumask library missed some flavors of cpumask_any_but(), which makes
users to workaround it by using less efficient cpumask_nth() functions
This series adds missing cpumask_any_andnot_but() and makes
cpumask_any_but() understanding the RESCTRL_PICK_ANY_CPU hint.
This simplifies cpumask_any_housekeeping() significantly.
v1: https://lore.kernel.org/all/20250407153856.133093-1-yury.norov@gmail.com/
v2:
- switch cpumask_any_but() functions to signed type for CPU (Reinette);
- change name for the new function to cpumask_any_andnot_but() (James);
- drop O(n*log(n)) comment. cpumask_nth() is slower, but still linear.
Yury Norov [NVIDIA] (4):
cpumask: relax cpumask_any_but()
find: add find_first_andnot_bit()
cpumask: add cpumask_{first,next}_andnot() API
x86/resctrl: optimize cpumask_any_housekeeping()
arch/x86/kernel/cpu/resctrl/internal.h | 28 +++-------
include/linux/cpumask.h | 75 ++++++++++++++++++++++++--
include/linux/find.h | 25 +++++++++
lib/find_bit.c | 11 ++++
4 files changed, 114 insertions(+), 25 deletions(-)
--
2.43.0
Powered by blists - more mailing lists