Re: [PATCH v5 10/24] tick/nohz: Move tick_nohz_full_mask declaration outside the #ifdef
From: Reinette Chatre
Date: Wed Aug 09 2023 - 18:34:24 EST
Hi James,
On 7/28/2023 9:42 AM, James Morse wrote:
> tick_nohz_full_mask lists the CPUs that are nohz_full. This is only
> needed when CONFIG_NO_HZ_FULL is defined. tick_nohz_full_cpu() allows
> a specific CPU to be tested against the mask, and evaluates to false
> when CONFIG_NO_HZ_FULL is not defined.
>
> The resctrl code needs to pick a CPU to run some work on, a new helper
> prefers housekeeping CPUs by examining the tick_nohz_full_mask. Hiding
> the declaration behind #ifdef CONFIG_NO_HZ_FULL forces all the users to
> be behind an ifdef too.
>
> Move the tick_nohz_full_mask declaration, this lets callers drop the
> ifdef, and guard access to tick_nohz_full_mask with IS_ENABLED() or
> something like tick_nohz_full_cpu().
>
> The definition does not need to be moved as any callers should be
> removed at compile time unless CONFIG_NO_HZ_FULL is defined.
>
> Signed-off-by: James Morse <james.morse@xxxxxxx>
> ---
> include/linux/tick.h | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
This is outside of the resctrl area. What is the upstreaming
plan for this patch?
Reinette