Commit 63f500c3 authored by Andrea Righi's avatar Andrea Righi Committed by Tejun Heo
Browse files

sched_ext: Guard cpu_smt_mask() with CONFIG_SCHED_SMT



Wrap cpu_smt_mask() usage with CONFIG_SCHED_SMT to avoid build failures
on kernels built without SMT support.

Fixes: 2197cecd ("sched_ext: idle: Prioritize idle SMT sibling")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603221422.XIueJOE9-lkp@intel.com/


Signed-off-by: default avatarAndrea Righi <arighi@nvidia.com>
Reviewed-by: default avatarCheng-Yang Chou <yphbchou0911@gmail.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent e73b1d72
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -622,6 +622,7 @@ s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
		goto out_unlock;
	}

#ifdef CONFIG_SCHED_SMT
	/*
	 * Use @prev_cpu's sibling if it's idle.
	 */
@@ -633,6 +634,7 @@ s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
				goto out_unlock;
		}
	}
#endif

	/*
	 * Search for any idle CPU in the same LLC domain.