infrastructure for scheduler bpf
Guan Jing (12):
sched: programmable: Introduce bpf sched
sched: programmable: Add a tag for the task
sched: programmable: Add a tag for the task group
sched: programmable: Add user interface of task group tag
sched: programmable: Add user interface of task tag
sched: basic infrastructure for scheduler bpf
sched: introduce bpf_sched_enable()
libbpf: add support for scheduler bpf programs
bpftool: recognize scheduler programs
sched: Add helper functions to get cpu statistics
sched: programmable: Add hook in select_task_rq_fair()
sched: programmable: Add hook in can_migrate_task()
arch/arm64/configs/openeuler_defconfig | 1 +
arch/x86/configs/openeuler_defconfig | 1 +
fs/proc/base.c | 64 ++++++++++++++
include/linux/bpf_sched.h | 50 +++++++++++
include/linux/bpf_types.h | 4 +
include/linux/sched.h | 38 ++++++++
include/linux/sched_hook_defs.h | 4 +
include/uapi/linux/bpf.h | 9 ++
init/init_task.c | 3 +
kernel/bpf/Kconfig | 12 +++
kernel/bpf/btf.c | 1 +
kernel/bpf/syscall.c | 27 ++++++
kernel/bpf/trampoline.c | 1 +
kernel/bpf/verifier.c | 11 ++-
kernel/sched/bpf_sched.c | 102 +++++++++++++++++++++
kernel/sched/build_utility.c | 4 +
kernel/sched/core.c | 118 +++++++++++++++++++++++++
kernel/sched/fair.c | 45 ++++++++++
kernel/sched/sched.h | 10 +++
scripts/bpf_doc.py | 4 +
tools/include/uapi/linux/bpf.h | 9 ++
tools/lib/bpf/bpf.c | 1 +
tools/lib/bpf/libbpf.c | 23 ++++-
tools/lib/bpf/libbpf.h | 2 +
tools/lib/bpf/libbpf.map | 1 +
25 files changed, 543 insertions(+), 2 deletions(-)
create mode 100644 include/linux/bpf_sched.h
create mode 100644 include/linux/sched_hook_defs.h
create mode 100644 kernel/sched/bpf_sched.c
--
2.34.1