Reimplementation of the sched_football test from LTP: https://github.com/linux-test-project/ltp/blob/master/testcases/realtime/func/sched_football/sched_football.c But reworked to run in the kernel and utilize mutexes/rt_mutexes to illustrate proper boosting of low priority mutex holders. Cc: Joel Fernandes <joelaf@google.com> Cc: Qais Yousef <qyousef@layalina.io> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Valentin Schneider <vschneid@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ben Segall <bsegall@google.com> Cc: Zimuzo Ezeozue <zezeozue@google.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Will Deacon <will@kernel.org> Cc: Waiman Long <longman@redhat.com> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: "Paul E. McKenney" <paulmck@kernel.org> Cc: Metin Kaya <Metin.Kaya@arm.com> Cc: Xuewen Yan <xuewen.yan94@gmail.com> Cc: K Prateek Nayak <kprateek.nayak@amd.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: kernel-team@android.com Change-Id: I26e5496c44bf3b1432e9d335b5509bd228b18f8e Signed-off-by: John Stultz <jstultz@google.com> Bug: 306081722 --- v8: * Use rt_mutexes for !CONFIG_SCHED_PROXY_EXEC * Bail if spawned players don't check in within 30s * Numerous spelling corrections from Randy Dunlap and Metin Kaya * Lots of other improvements suggested by Metin Kaya * Minor checkpatch fixups v9: * A bunch more cleanups and improvements suggsted by Metin * Use #defines for magic time and prio values, suggested by Metin * Fail if CONFIG_SCHED_PROXY_EXEC=y but !sched_proxy_exec(), again pointed out by Metin * Fix Kconfig entry to be bool instead of tristate as it doesn't really work as a module yet. Pointed out by Metin * Few minor checkpatch fixups v12: * Renamed to ksched_football to avoid confusion with LTP test * Enabled the test to be re-runnable via sysfs trigger * Enabled the test to be run for longer periods of time via sysfs trigger
37 lines
1.4 KiB
Makefile
37 lines
1.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# The compilers are complaining about unused variables inside an if(0) scope
|
|
# block. This is daft, shut them up.
|
|
ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
|
|
|
|
# These files are disabled because they produce non-interesting flaky coverage
|
|
# that is not a function of syscall inputs. E.g. involuntary context switches.
|
|
KCOV_INSTRUMENT := n
|
|
|
|
# Disable KCSAN to avoid excessive noise and performance degradation. To avoid
|
|
# false positives ensure barriers implied by sched functions are instrumented.
|
|
KCSAN_SANITIZE := n
|
|
KCSAN_INSTRUMENT_BARRIERS := y
|
|
|
|
ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
|
|
# According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
|
|
# needed for x86 only. Why this used to be enabled for all architectures is beyond
|
|
# me. I suspect most platforms don't need this, but until we know that for sure
|
|
# I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k
|
|
# to get a correct value for the wait-channel (WCHAN in ps). --davidm
|
|
CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer
|
|
endif
|
|
|
|
#
|
|
# Build efficiency:
|
|
#
|
|
# These compilation units have roughly the same size and complexity - so their
|
|
# build parallelizes well and finishes roughly at once:
|
|
#
|
|
obj-y += core.o
|
|
obj-y += fair.o
|
|
obj-y += build_policy.o
|
|
obj-y += build_utility.o
|
|
obj-$(CONFIG_ANDROID_VENDOR_HOOKS) += vendor_hooks.o
|
|
obj-$(CONFIG_SCHED_RT_INVARIANT_TEST) += test_ksched_football.o
|