Unverified Commit c037716f authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents 1d4ddaa5 5ea39a25
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ config ARM64
	select ARCH_SUPPORTS_ATOMIC_RMW
	select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && (GCC_VERSION >= 50000 || CC_IS_CLANG)
	select ARCH_SUPPORTS_NUMA_BALANCING
	select ARCH_SUPPORTS_SCHED_KEEP_ON_CORE
	select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
	select ARCH_WANT_DEFAULT_BPF_JIT
+0 −1
Original line number Diff line number Diff line
@@ -194,7 +194,6 @@ CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_SCHED_STEAL=y
# CONFIG_SCHED_KEEP_ON_CORE is not set
CONFIG_CHECKPOINT_RESTORE=y
CONFIG_SCHED_AUTOGROUP=y
# CONFIG_SYSFS_DEPRECATED is not set
+7 −0
Original line number Diff line number Diff line
@@ -1370,8 +1370,15 @@ config SCHED_STEAL

	  If unsure, say N here.

#
# For architectures that want to enable the support for SCHED_KEEP_ON_CORE
#
config ARCH_SUPPORTS_SCHED_KEEP_ON_CORE
	bool

config SCHED_KEEP_ON_CORE
	bool "Prefer physical cores when migrating tasks"
	depends on ARCH_SUPPORTS_SCHED_KEEP_ON_CORE
	depends on SCHED_SMT
	default n
	help
+5 −2
Original line number Diff line number Diff line
@@ -7330,13 +7330,16 @@ static int select_idle_core(struct task_struct *p, int core, struct cpumask *cpu
#ifdef CONFIG_SCHED_KEEP_ON_CORE
int sysctl_sched_util_ratio = 100;

static int core_has_spare(int cpu)
static bool core_has_spare(int cpu)
{
	int core_id = cpumask_first(cpu_smt_mask(cpu));
	struct rq *rq = cpu_rq(core_id);
	unsigned long util = rq->cfs.avg.util_avg;
	unsigned long util = cpu_util(cpu);
	unsigned long capacity = rq->cpu_capacity;

	if (sysctl_sched_util_ratio == 100)
		return true;

	return util * 100 < capacity * sysctl_sched_util_ratio;
}
#endif
+1 −0
Original line number Diff line number Diff line
@@ -2828,6 +2828,7 @@ static struct ctl_table kern_table[] = {
		.mode           = 0644,
		.proc_handler   = proc_dointvec_minmax,
		.extra1         = SYSCTL_ZERO,
		.extra2		= &one_hundred,
	},
#endif
#ifdef CONFIG_SCHED_STEAL