Commit 5cd4e53a authored by Hui Tang's avatar Hui Tang
Browse files

sched: Fix build error for dynamic_affinity_enable()

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7PNAF



-------------------------------

Fix build error if defined(!CONFIG_JUMP_LABEL) &&
defined(CONFIG_QOS_SCHED_DYNAMIC_AFFINITY).

Fixes: d8f77f89 ("sched: fix performance degradation on lmbench")
Signed-off-by: default avatarHui Tang <tanghui20@huawei.com>
parent 87684ac5
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -7070,8 +7070,6 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu)
}

#ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY

#ifdef CONFIG_JUMP_LABEL
static DEFINE_STATIC_KEY_FALSE(__dynamic_affinity_used);

static __always_inline bool dynamic_affinity_used(void)
@@ -7084,13 +7082,6 @@ void dynamic_affinity_enable(void)
	static_branch_enable_cpuslocked(&__dynamic_affinity_used);
}

#else /* CONFIG_JUMP_LABEL */
static __always_inline bool dynamic_affinity_used(void)
{
	return true;
}
#endif

/*
 * Low utilization threshold for CPU
 *