Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 765c2ab3 authored by Patrick Bellasi's avatar Patrick Bellasi Committed by John Stultz
Browse files

FIXUP: sched: fix build for non-SMP target



Currently the build for a single-core (e.g. user-mode) Linux is broken
and this configuration is required (at least) to run some network tests.

The main issues for the current code support on single-core systems are:
1. {se,rq}::sched_avg is not available nor maintained for !SMP systems
   This means that load and utilisation signals are NOT available in single
   core systems. All the EAS code depends on these signals.
2. sched_group_energy is also SMP dependant. Again this means that all the
   EAS setup and preparation code (energyn model initialization) has to be
   properly guarded/disabled for !SMP systems.
3. SchedFreq depends on utilization signal, which is not available on
   !SMP systems.
4. SchedTune is useless on unicore systems if SchedFreq is not available.
5. WALT machinery is not required on single-core systems.

This patch addresses all these issues by enforcing some constraints for
single-core systems:
a) WALT, SchedTune and SchedTune are now dependant on SMP
b) The default governor for !SMP systems is INTERACTIVE
c) The energy model initialisation/build functions are
d) Other minor code re-arrangements and CONFIG_SMP guarding to enable
   single core builds.

Signed-off-by: default avatarPatrick Bellasi <patrick.bellasi@arm.com>
parent ae54c774
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -195,6 +195,7 @@ config CPU_FREQ_GOV_CONSERVATIVE
config CPU_FREQ_GOV_SCHED
	bool "'sched' cpufreq governor"
	depends on CPU_FREQ
	depends on SMP
	select CPU_FREQ_GOV_COMMON
	help
	  'sched' - this governor scales cpu frequency from the
+8 −0
Original line number Diff line number Diff line
@@ -29,8 +29,16 @@
#define for_each_possible_sd_level(level)		    \
	for (level = 0; level < NR_SD_LEVELS; level++)

#ifdef CONFIG_SMP

extern struct sched_group_energy *sge_array[NR_CPUS][NR_SD_LEVELS];

void init_sched_energy_costs(void);

#else

#define init_sched_energy_costs() do { } while (0)

#endif /* CONFIG_SMP */

#endif
+4 −0
Original line number Diff line number Diff line
@@ -587,6 +587,8 @@ TRACE_EVENT(sched_contrib_scale_f,
		  __entry->cpu_scale_factor)
);

#ifdef CONFIG_SMP

/*
 * Tracepoint for accounting sched averages for tasks.
 */
@@ -886,6 +888,8 @@ TRACE_EVENT(sched_tune_filter,
		__entry->payoff, __entry->region)
);

#endif /* CONFIG_SMP */

#endif /* _TRACE_SCHED_H */

/* This part must be outside protection */
+1 −0
Original line number Diff line number Diff line
@@ -1256,6 +1256,7 @@ config SCHED_AUTOGROUP

config SCHED_TUNE
	bool "Boosting for CFS tasks (EXPERIMENTAL)"
	depends on SMP
	help
	  This option enables the system-wide support for task boosting.
	  When this support is enabled a new sysctl interface is exposed to
+2 −2
Original line number Diff line number Diff line
@@ -12,9 +12,9 @@ CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer
endif

obj-y += core.o loadavg.o clock.o cputime.o
obj-y += idle_task.o fair.o rt.o deadline.o stop_task.o energy.o
obj-y += idle_task.o fair.o rt.o deadline.o stop_task.o
obj-y += wait.o completion.o idle.o
obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o
obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o energy.o
obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o
obj-$(CONFIG_SCHEDSTATS) += stats.o
obj-$(CONFIG_SCHED_DEBUG) += debug.o
Loading