Commit 211b6fb7 authored by Tim Chen's avatar Tim Chen Committed by Jie Liu
Browse files

scheduler: Create SDTL_SKIP flag to skip topology level

kunpeng inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5W44S
CVE: NA

Reference: https://lore.kernel.org/lkml/cover.1638563225.git.tim.c.chen@linux.intel.com/



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

A system admin may not want to use cluster scheduling.  Make changes to
allow cluster topology level to be skipped when building sched domains.

Create SDTL_SKIP bit on the sched_domain_topology_level flag so we can
check if the cluster topology level should be skipped when building
sched domains.

Signed-off-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: default avatarJie Liu <liujie375@h-partners.com>
parent 0c3a4f98
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ typedef const struct cpumask *(*sched_domain_mask_f)(int cpu);
typedef int (*sched_domain_flags_f)(void);

#define SDTL_OVERLAP	0x01
#define SDTL_SKIP	0x02

struct sd_data {
	struct sched_domain *__percpu *sd;
+9 −1
Original line number Diff line number Diff line
@@ -1557,8 +1557,16 @@ static struct sched_domain_topology_level default_topology[] = {
static struct sched_domain_topology_level *sched_domain_topology =
	default_topology;

static struct sched_domain_topology_level *next_tl(struct sched_domain_topology_level *tl)
{
	++tl;
	while (tl->mask && tl->flags & SDTL_SKIP)
		++tl;
	return tl;
}

#define for_each_sd_topology(tl)			\
	for (tl = sched_domain_topology; tl->mask; tl++)
	for (tl = sched_domain_topology; tl->mask; tl = next_tl(tl))

void set_sched_topology(struct sched_domain_topology_level *tl)
{