Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.10-rc2-scx1 #28

Merged
merged 748 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
748 commits
Select commit Hold shift + click to select a range
13f2f03
Merge pull request #158 from sched-ext/htejun
htejun Mar 8, 2024
68fc8d6
scx: Trivial updates from patch splitting
htejun Mar 9, 2024
aea1cd0
Merge pull request #160 from sched-ext/htejun
Byte-Lab Mar 11, 2024
94dc0c0
scx: Use cpu_online_mask when resetting idle masks
htejun Mar 13, 2024
925e4d8
Merge pull request #161 from sched-ext/htejun
Byte-Lab Mar 13, 2024
7b1e063
scx: Update selftests to use new UEI macros
Byte-Lab Mar 14, 2024
873e7a4
scx: Add newline after test error output
Byte-Lab Mar 14, 2024
bbb65a3
Merge pull request #163 from sched-ext/fix_selftests
htejun Mar 14, 2024
6d5da8c
scx: Improve error behavior when p->scx.cgrp_moving_from is unexpecte…
htejun Mar 19, 2024
d439866
scx: Fix ops.cgroup_move() not being called on a task which went thro…
htejun Mar 19, 2024
fc86083
Merge pull request #165 from sched-ext/htejun
htejun Mar 19, 2024
83e31d6
scx: Update conditions for WAKE_SYNC migration
Byte-Lab Mar 28, 2024
2fc287e
Merge pull request #167 from sched-ext/select_dfl_wake_sync
Byte-Lab Mar 28, 2024
79f18e5
scx_flatcg: Keep cgroup rb nodes stashed
davemarchevsky Dec 14, 2023
11ed27f
scx: Allow clean exits from the scheduler with scx_bpf_exit()
Byte-Lab Mar 14, 2024
e831248
scx: Add scx_bpf_exit() macro to scx/common.bpf.h
Byte-Lab Mar 14, 2024
a0b24e0
scx: Fix init_enable_count
Byte-Lab Mar 25, 2024
14162f7
scx: Add selftests for scx_bpf_exit()
Byte-Lab Mar 27, 2024
27688fa
Merge pull request #166 from sched-ext/clean_exit_bpf
Byte-Lab Mar 28, 2024
e227931
Merge pull request #168 from sched-ext/sync-from-scx
htejun Mar 28, 2024
368ada6
Merge branch 'bpf/for-next' into sync-bpf-next
htejun Mar 29, 2024
fe1f6ad
scx: Build fix after pulling bpf/for-next
htejun Mar 29, 2024
7db6edd
scx: Use the new struct_ops compatibililty mechanism
htejun Mar 29, 2024
5121551
Merge pull request #169 from sched-ext/sync-bpf-next
htejun Mar 29, 2024
e34c7df
Merge pull request #170 from sched-ext/scx-simpler-ops-versioning
htejun Mar 29, 2024
4414973
scx: Reorder scx_ops_flags enums to restore backward compatibility
htejun Apr 2, 2024
5dc9530
scx/compat.h: __COMPAT_read_enum() should use btf__find_by_name()
htejun Apr 2, 2024
d36c66c
Merge pull request #171 from sched-ext/api-update-fallouts
Byte-Lab Apr 2, 2024
3b1871a
scx: Allow calling scx kfuncs from BPF_PROG_TYPE_SYSCALL
Byte-Lab Apr 4, 2024
711d8c1
scx/selftest: Add testcase invoking a kfunc with BPF_PROG_RUN
Byte-Lab Apr 4, 2024
ba16c88
Merge pull request #172 from sched-ext/kfuncs_syscall
htejun Apr 4, 2024
0cd5c16
scx: Add a few missing config options from selftests
Byte-Lab Apr 4, 2024
e138c7c
scx: Update minimal testcase to be completely minimal
Byte-Lab Apr 4, 2024
635e5f8
scx: Use __COMPAT_ENUM_OR_ZERO for reading exit values
Byte-Lab Apr 4, 2024
e74f696
Merge pull request #173 from sched-ext/selftests
htejun Apr 4, 2024
5e32ef4
scx: Cosmetic changes to kfuncs
htejun Apr 5, 2024
779538f
Merge pull request #174 from sched-ext/htejun/misc
htejun Apr 5, 2024
01a08c4
scx: Fix trivial grammatical typo
Byte-Lab Apr 5, 2024
aaf86e5
Merge pull request #175 from sched-ext/typo
htejun Apr 5, 2024
5fe9b9b
scx: Spaces -> tabs in a couple places
Byte-Lab Apr 6, 2024
35d303a
Merge pull request #176 from sched-ext/fix_tabs
htejun Apr 6, 2024
0213f1b
scx: Add scx_ops_exit() macro for exiting from ext.c
Byte-Lab Apr 5, 2024
e41cbfa
scx: Exit a scheduler for unhandled hotplug events
Byte-Lab Apr 5, 2024
e298904
scx: Add more user_exit_info macros for exit code
Byte-Lab Apr 10, 2024
e77fa31
scx: Add selftests for hotplug operations
Byte-Lab Apr 8, 2024
37b3f83
Merge pull request #177 from sched-ext/hotplug_restart
htejun Apr 10, 2024
a0cca0e
scx: Fix allocation of scx_kick_cpus_pnt_seqs[]
htejun Apr 10, 2024
9054b79
scx: Reorder kfunc decls in common.bpf.h
htejun Apr 10, 2024
1226dcc
scx: Make ops_cpu_valid() invoke scx_ops_error() automtically
htejun Apr 10, 2024
653a19e
scx: Move defs of sched_ext_ops and friends to ext.c
htejun Apr 10, 2024
ce08a32
scx: Add scx_bpf_nr_cpu_ids(), scx_bpf_get_possible/online_cpumask() …
htejun Apr 10, 2024
1aee870
Merge pull request #178 from sched-ext/htejun/reorg
htejun Apr 10, 2024
8c5b199
scx: Fix a few typos
Byte-Lab Apr 10, 2024
8584503
scx: Add hotplug sequence number
Byte-Lab Apr 10, 2024
89a0d6f
scx: Add hotplug seq to sched_ext_ops
Byte-Lab Apr 10, 2024
b276ddd
scx: Add new macros to compat.h
Byte-Lab Apr 11, 2024
9fabb99
scx: Add selftests for validating hotplug seq checks
Byte-Lab Apr 10, 2024
71694be
Merge pull request #179 from sched-ext/hotplug_final_pieces
Byte-Lab Apr 11, 2024
16ab1af
scx_qmap: Add struct cpu_ctx
htejun Apr 12, 2024
57e39d9
scx: Uninline scx_notify_sched_tick() and scx_notify_pick_next_task()
htejun Apr 12, 2024
39c9a0b
sched: Factor out update_other_load_avgs() from __update_blocked_othe…
htejun Apr 12, 2024
09f2c40
scx: Should update load avg and util metrics for other classes and me…
htejun Apr 12, 2024
c4e4144
cpufreq_schedutil: Refactor sugov_cpu_is_busy()
htejun Apr 12, 2024
1d88435
scx: Implement sched_ext_ops.tick()
htejun Apr 12, 2024
2c2b2e3
scx: Implement scx_bpf_cpuperf_cap() and scx_bpf_cpuperf_cur()
htejun Apr 12, 2024
fbc1f9a
scx: Implement scx_bpf_cpuperf_set()
htejun Apr 12, 2024
41442f4
Merge pull request #180 from sched-ext/htejun/cpufreq
htejun Apr 12, 2024
0511de1
scx: Mark sched_ext uclamp enabled
htejun Apr 12, 2024
283928c
Merge pull request #181 from sched-ext/htejun/cpufreq
Byte-Lab Apr 12, 2024
90359c0
scx: Fix build when !CONFIG_SCHED_CLASS_EXT
htejun Apr 19, 2024
cd2a121
Merge pull request #184 from sched-ext/htejun/fix-build
htejun Apr 19, 2024
b04eb3e
scx: Add barrier() to scx_kf_[dis]allow()
htejun Apr 23, 2024
9400d6e
scx: Add init_scx_entity() and initialize scx->tasks_node too
htejun Apr 23, 2024
a7df32b
scx: Cosmetic / trivial changes
htejun Apr 23, 2024
8a5b978
scx: Make scx_kf_allowed_on_arg_tasks() actually use @mask
htejun Apr 23, 2024
d6d0db6
scx: Make scx_bpf_dsq_nr_queued() safe to call from any context
htejun Apr 23, 2024
c636cf8
scx: Remove scx_kfunc_set_ops_only
htejun Apr 23, 2024
996286f
scx: Use WRITE_ONCE/READ_ONCE() on dsq->nr
htejun Apr 23, 2024
a5e996c
scx: Rename scx_dispatch_q node field names
htejun Apr 23, 2024
8adc78c
scx: Use uncached rbtree for dsq priq
htejun Apr 23, 2024
f25afc8
scx: Always keep tasks on dsq->list
htejun Apr 23, 2024
be87f28
scx: Move p->scx.dsq_flags into p->scx.dsq_node
htejun Apr 23, 2024
d1e6915
scx: Introduce nldsq_next_task() and nldsq_for_each_task()
htejun Apr 23, 2024
3c1c97b
scx: Implement BPF DSQ iterator
htejun Apr 23, 2024
fd4df11
scx: Refactor consume_dispatch_q()
htejun Apr 23, 2024
ee83d52
scx: Better task_can_run_on_remote_rq()
htejun Apr 23, 2024
221f6dc
scx_qmap: Use a user DSQ instead of DSQ_GLOBAL
htejun Apr 23, 2024
f7be5ef
scx: Implement scx_bpf_consume_task()
htejun Apr 23, 2024
2ab30f7
Merge pull request #185 from sched-ext/htejun/dsq-iter
htejun Apr 23, 2024
cc2764e
Merge branch 'bpf/for-next' into pull-bpf-for-next
htejun Apr 23, 2024
42fef8b
Merge pull request #186 from sched-ext/htejun/pull-bpf-for-next
Byte-Lab Apr 23, 2024
a4bc772
scx: Cosmetic changes from patch split
htejun Apr 25, 2024
8628f01
Merge pull request #187 from sched-ext/htejun/misc
Byte-Lab Apr 25, 2024
dc24d4e
scx: Don't do debug dump on non-error exits
htejun Apr 26, 2024
36a08e0
user_exit_info: Fix and clean up ECODE handling and apply to the exam…
htejun Apr 26, 2024
ebbd3d8
scx/compat.h: Fix inversed struct_has_field test in SCX_OPS_LOAD()
htejun Apr 26, 2024
d2d4e8a
tools/sched_ext: Add compat helpers for the new features
htejun Apr 26, 2024
1d59f25
scx/compat.h: Add backward compat support for missing ops.tick()
htejun Apr 26, 2024
4598fef
scx: Cosmetic changes
htejun Apr 26, 2024
fa00fb9
tools/sched_ext: Drop libbpf_set_strict_mode() calls
htejun Apr 26, 2024
ea9d91c
tools/sched_ext: Add -v option to example schedulers to aid debugging…
htejun Apr 27, 2024
ef638e6
scx: Check for 0 slice after set_next_task_scx()
htejun Apr 27, 2024
89b7ecc
scx: Build fixes for UP and SCX off
htejun Apr 27, 2024
8518ada
Merge pull request #188 from sched-ext/htejun/misc
htejun Apr 29, 2024
cc3f5c4
Merge branch 'bpf/for-next' into htejun/pull-bpf-for-next
htejun Apr 29, 2024
73f4013
Merge pull request #189 from sched-ext/htejun/pull-bpf-for-next
htejun Apr 29, 2024
7a3bce8
tools/sched_ext: Add __COMPAT_scx_bpf_exit()
htejun Apr 29, 2024
670bdab
Merge pull request #190 from sched-ext/htejun/misc
htejun Apr 29, 2024
1524224
scx: Download missing CI packages
Byte-Lab Apr 30, 2024
92505bf
scx: Refactor binary run logic in scx CI
Byte-Lab Apr 30, 2024
1ea92e2
scx: Fix selftests
Byte-Lab Apr 30, 2024
1ef9ac4
scx: Run selftests in scx CI
Byte-Lab Apr 30, 2024
56ed34c
Merge pull request #191 from sched-ext/ci
Byte-Lab Apr 30, 2024
e15b351
MAINTAINERS: Separate out sched_ext tree
htejun Apr 30, 2024
68562f4
Merge pull request #192 from sched-ext/htejun/misc
htejun Apr 30, 2024
d22cb10
MAINTAINERS: Add link to SCX repo
htejun Apr 30, 2024
24371ce
Merge pull request #193 from sched-ext/htejun/misc
htejun Apr 30, 2024
0421c75
scx_qmap: monitor_cpuperf() also needs __COMPAT_HAS_CPUMASKS test
htejun May 1, 2024
1c6fd61
Merge pull request #194 from sched-ext/htejun/misc
Byte-Lab May 1, 2024
dbcf7fb
bstr
htejun May 2, 2024
ec7e3b0
implement-ops
htejun May 2, 2024
25f52fc
Merge pull request #195 from sched-ext/htejun/dump-ops
htejun May 2, 2024
0caf6fc
ci: enable kvm support in the github workflow
May 3, 2024
921166b
Merge pull request #196 from sched-ext/ci-enable-kvm
htejun May 3, 2024
a95e0bf
[PATCH] SCX: scx_ops_bypass() can't grab a mutex
htejun May 4, 2024
1d02538
Merge pull request #198 from sched-ext/htejun/fix-stop-hang
Byte-Lab May 5, 2024
57845b3
scx: Dispatch locally until ops.cpu_online() invoked
Byte-Lab May 3, 2024
918cd48
Merge pull request #197 from sched-ext/hotplug_online
Byte-Lab May 5, 2024
b46212c
scx: Fix exit/error bstr formatting
Byte-Lab May 6, 2024
ed5ff6f
scx: Use per-cpu vars to CPU lifecycle
Byte-Lab May 6, 2024
1bb91a4
scx: Document semantics for ops during hotplug events
Byte-Lab May 6, 2024
91c9045
Merge pull request #200 from sched-ext/fix_print
htejun May 6, 2024
d61d98e
Merge pull request #199 from sched-ext/dispatch_hotplug
htejun May 6, 2024
725d5d4
scx/compat.bpf.h: Add __COMPAT_scx_bpf_dump() and fix __COMPAT_scx_bp…
htejun May 9, 2024
a609649
scx: Use a global bstr formatting buffer instead of percpu
htejun May 9, 2024
1c3ec4b
scx: Package dump related fields into struct scx_dump_data
htejun May 9, 2024
f5b97f2
scx: Add dump_line()
htejun May 9, 2024
9d9b07c
scx: Add dump_stack_trace()
htejun May 9, 2024
8ee9ebe
scx: Refactor bstr_format() and make dump path use its own buffers
htejun May 9, 2024
9263e7f
scx: Assemble ops dump output into lines before calling dump_line()
htejun May 9, 2024
b9aeb1b
scx: Implicitly output newline from dump_line()
htejun May 9, 2024
13aae89
scx: Fix short dump buf handling
htejun May 9, 2024
3766574
scx: Send dump output through a tracepoint too
htejun May 9, 2024
5983930
scx: Trigger debug dump with sysrq-D
htejun May 9, 2024
d180eff
scx: Include dsq_vtime in dump
htejun May 9, 2024
5a00279
Merge pull request #201 from sched-ext/htejun/dump
htejun May 9, 2024
3baae12
scx: Always use rq->scx instead of scx_rq
htejun May 17, 2024
3a44769
scx: Replace scx_cpu_online percpu var with SCX_RQ_ONLINE flag
htejun May 17, 2024
7d196e5
scx: Allocate scx_dsp_ctx together with scx_dsp_buf
htejun May 17, 2024
6a5cf23
scx/common.bpf.h: Sync from SCX repo
htejun May 17, 2024
c592e1c
Merge pull request #203 from sched-ext/htejun/cleanups
Byte-Lab May 17, 2024
8f4a950
Merge branch 'bpf/for-next' into htejun/pull-bpf-for-next
htejun May 17, 2024
9cfa965
Merge pull request #204 from sched-ext/htejun/pull-bpf-for-next
Byte-Lab May 17, 2024
f266831
scx: Close a small race window in the enable path which can lead to u…
htejun May 17, 2024
ddd689b
scx: Sync from the SCx repo
htejun May 18, 2024
fb1406f
Merge pull request #205 from sched-ext/htejun/fix-task-iter-race
Byte-Lab May 18, 2024
0042b59
Merge pull request #206 from sched-ext/htejun/sync-scx
Byte-Lab May 18, 2024
94133cf
bpftool: Introduce btf c dump sorting
mykyta5 May 14, 2024
e7b64f9
bpftool: Fix make dependencies for vmlinux.h
sm00th May 13, 2024
34021ca
kbuild, bpf: Use test-ge check for v1.25-only pahole
alan-maguire May 14, 2024
6f130e4
bpf: Fix order of args in call to bpf_map_kvcalloc
sheharyaar May 16, 2024
bebdd58
scx: Fix typos
vax-r May 21, 2024
dda9ab3
Merge pull request #207 from vax-r/Fix_typo
htejun May 21, 2024
f4aba34
bpftool: Un-const bpf_func_info to fix it for llvm 17 and newer
bobrik May 20, 2024
1b0215a
bpf: Remove unused variable "prev_state"
zhangying029 May 21, 2024
6c8d759
selftests/bpf: Fix prog numbers in test_sockmap
May 17, 2024
67841ae
scx: Add a selftest for creating and destroying a DSQ
Byte-Lab May 22, 2024
98ece8c
Merge pull request #210 from sched-ext/create_dsq_test
Byte-Lab May 22, 2024
db7b5f1
scx: Invoke ops.exit_task() for TASK_DEAD tasks on disable path
Byte-Lab May 22, 2024
6f386ca
Merge pull request #211 from sched-ext/disable_fix
Byte-Lab May 22, 2024
ece4b29
net: netfilter: Make ct zone opts configurable for bpf ct helpers
gizmoguy May 22, 2024
a87f34e
selftests/bpf: Update tests for new ct zone opts for nf_conntrack kfuncs
gizmoguy May 22, 2024
c6d757a
Fix typo
vax-r May 23, 2024
f62ec64
Merge pull request #212 from vax-r/Fix_typo
Byte-Lab May 23, 2024
baff66e
scx: Branchless implementation of highest_bit
vax-r May 21, 2024
adadcf3
Merge pull request #208 from vax-r/Branchless_highest_bit
htejun May 23, 2024
4d25ca2
net: Rename mono_delivery_time to tstamp_type for scalabilty
May 9, 2024
1693c5d
net: Add additional bit to support clockid_t timestamp type
May 9, 2024
c34e3ab
selftests/bpf: Handle forwarding of UDP CLOCK_TAI packets
May 9, 2024
ecec188
Merge branch 'Replace mono_delivery_time with tstamp_type'
May 23, 2024
c12603e
riscv, bpf: Optimize zextw insn with Zba extension
XiaoWang1772 May 16, 2024
e944fc8
riscv, bpf: Use STACK_ALIGN macro for size rounding up
XiaoWang1772 May 23, 2024
99fa63d
riscv, bpf: Try RVC for reg move within BPF_CMPXCHG JIT
XiaoWang1772 May 19, 2024
2c1713a
bpf: constify member bpf_sysctl_kern:: Table
t-8ch May 18, 2024
4652072
bpf, docs: Move sentence about returning R0 to abi.rst
May 17, 2024
a985fdc
bpf, docs: Use RFC 2119 language for ISA requirements
May 17, 2024
4e1215d
bpf, docs: clarify sign extension of 64-bit use of 32-bit imm
May 20, 2024
6a6d8b6
bpf, docs: Add table captions
May 24, 2024
f980f13
bpf, docs: Clarify call local offset
May 25, 2024
91aa073
Sync with scx repo
vax-r May 26, 2024
e245ef8
bpf, docs: Fix instruction.rst indentation
May 26, 2024
7648df7
Merge pull request #213 from vax-r/Sync
htejun May 26, 2024
5233a55
mISDN: remove unused struct 'bf_ctx'
May 23, 2024
d9cbd83
bpf, net: Use DEV_STAT_INC()
May 23, 2024
c65b652
net/core: remove redundant sk_callback_lock initialization
May 26, 2024
de31e96
net/core: move the lockdep-init of sk_callback_lock to sk_init_common()
May 26, 2024
b2ff269
net: ethernet: starfire: remove unused structs
May 26, 2024
a09892f
net: ethernet: liquidio: remove unused structs
May 26, 2024
ef7f9fe
net: ethernet: mlx4: remove unused struct 'mlx4_port_config'
May 26, 2024
18ae4c0
net: ethernet: 8390: ne2k-pci: remove unused struct 'ne2k_pci_card'
May 26, 2024
c30ff5f
net: usb: remove unused structs 'usb_context'
May 26, 2024
4b3529e
Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel…
kuba-moo May 28, 2024
10d167d
SCX: Synchronize boot CPU's online state with SCX_RQ_ONLINE
htejun May 28, 2024
2c4bceb
Merge pull request #214 from sched-ext/htejun/fix-RQ_ONLINE-on-cpu0
htejun May 28, 2024
eb4e772
libbpf: Configure log verbosity with env variable
mykyta5 May 24, 2024
ed31adf
selftests/bpf: Drop struct post_socket_opts
May 25, 2024
6f802cb
selftests/bpf: Add start_server_str helper
May 25, 2024
e078255
selftests/bpf: Use post_socket_cb in connect_to_fd_opts
May 25, 2024
79b330c
selftests/bpf: Use post_socket_cb in start_server_str
May 25, 2024
ed61271
selftests/bpf: Use start_server_str in do_test in bpf_tcp_ca
May 25, 2024
fbe3e84
Merge branch 'use network helpers, part 5'
May 29, 2024
4665415
bpf: Add bits iterator
laoar May 17, 2024
6ba7acd
selftests/bpf: Add selftest for bits iter
laoar May 17, 2024
f088cab
Merge branch 'bpf-add-a-generic-bits-iterator'
anakryiko May 29, 2024
46253c4
selftests/bpf: use section names understood by libbpf in test_sockmap
jsitnicki May 22, 2024
73287fe
bpf: pass bpf_struct_ops_link to callbacks in bpf_struct_ops.
ThinkerYzu1 May 30, 2024
6fb2544
bpf: enable detaching links of struct_ops objects.
ThinkerYzu1 May 30, 2024
1adddc9
bpf: support epoll from bpf struct_ops links.
ThinkerYzu1 May 30, 2024
67c3e83
bpf: export bpf_link_inc_not_zero.
ThinkerYzu1 May 30, 2024
1a4b858
selftests/bpf: test struct_ops with epoll
ThinkerYzu1 May 30, 2024
d14c1fa
bpftool: Change pid_iter.bpf.c to comply with the change of bpf_link_…
ThinkerYzu1 May 30, 2024
3f8fde3
Merge branch 'Notify user space when a struct_ops object is detached/…
May 30, 2024
531876c
libbpf: keep FD_CLOEXEC flag when dup()'ing FD
anakryiko May 29, 2024
96a27ee
riscv, bpf: Introduce shift add helper with Zba optimization
XiaoWang1772 May 24, 2024
dfa7c9f
selftests/bpf: Remove unused struct 'scale_test_def'
Jun 2, 2024
3f67639
selftests/bpf: Remove unused 'key_t' structs
Jun 2, 2024
a450d36
selftests/bpf: Remove unused struct 'libcap'
Jun 2, 2024
ce5249b
bpftool: Fix typo in MAX_NUM_METRICS macro name
Jun 2, 2024
ec1249d
test_bpf: Add missing MODULE_DESCRIPTION()
May 31, 2024
d95ba15
selftests/bpf: Fix tx_prog_fd values in test_sockmap
May 23, 2024
a9f0ea1
selftests/bpf: Drop duplicate definition of i in test_sockmap
May 23, 2024
3f32a11
selftests/bpf: Use bpf_link attachments in test_sockmap
May 23, 2024
24bb90a
selftests/bpf: Replace tx_prog_fd with tx_prog in test_sockmap
May 23, 2024
467a0c7
selftests/bpf: Drop prog_fd array in test_sockmap
May 23, 2024
dcb681b
selftests/bpf: Fix size of map_fd in test_sockmap
May 23, 2024
de1b5ea
selftests/bpf: Check length of recv in test_sockmap
May 23, 2024
49784c7
selftests/bpf: Drop duplicate bpf_map_lookup_elem in test_sockmap
May 23, 2024
ae87a82
Merge branch 'bpf/for-next' into htejun/pull-bpf-for-next
htejun Jun 3, 2024
e6508a4
scx: Build fixes after pulling in bpf/for-next
htejun Jun 3, 2024
c071b9d
Merge pull request #216 from sched-ext/htejun/pull-bpf-for-next
htejun Jun 3, 2024
208203e
scx: Fix local DSQ comparison in dispatch_to_local_dsq()
Byte-Lab Jun 5, 2024
35aacc4
scx: Add selftest for SCX_DSQ_LOCAL_ON dispatching
Byte-Lab Jun 5, 2024
95e71aa
Merge pull request #219 from sched-ext/dispatch_local
Byte-Lab Jun 5, 2024
24db48d
scx: Remove enum rq_onoff_reason enum
Byte-Lab Jun 4, 2024
a5a1608
scx: Call directly into ext.c for hotplug events
Byte-Lab Jun 5, 2024
36773d9
scx: Validate that cpu callbacks can be sleepable
Byte-Lab Jun 6, 2024
9ee6343
Merge pull request #217 from sched-ext/fix_hotplug
Byte-Lab Jun 6, 2024
56d4acf
scx: Flip order of scx_rq_{de}activate()
Byte-Lab Jun 6, 2024
418ead7
Merge commit '56d4acf2c0ae90e8f96550137e1fd63b817f7260' into scx-6.10…
Byte-Lab Jun 6, 2024
cf73b5c
v6.10-rc2-scx1
Byte-Lab Jun 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/run-schedulers
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/bin/bash
#
# Run sched-ext scheduler for TIMEOUT seconds inside virtme-ng and catch
# potential errors, then unload the scheduler and return the exit status.

# Maximum time for each scheduler run.
TEST_TIMEOUT=30

# Maximum timeout for the guest used for each scheduler run (this is used to
# hard-shutdown the guest in case of system hangs).
GUEST_TIMEOUT=60

# Check if virtme-ng is available.
if [ ! -x `which vng` ]; then
echo "vng not found, please install virtme-ng to enable testing"
exit 1
fi

function runtest() {
local bin="${1}"

if [ -z "${bin}" ]; then
echo "No binary passed to runtest"
exit 1
fi

if ! [ -f "${bin}" ]; then
echo "Binary ${bin} was not a regular file"
exit 1
fi

rm -f /tmp/output
(timeout --foreground --preserve-status ${GUEST_TIMEOUT} \
vng --force-9p --verbose -- \
"timeout --foreground --preserve-status ${TEST_TIMEOUT} ${bin}" \
2>&1 </dev/null || true) | tee /tmp/output
}

# Test all the available schedulers.
#
# NOTE: virtme-ng automatically runs the kernel from the current working
# directory by default.
#
# Each scheduler will be tested in a separate instance booted from scratch, to
# ensure that each run does not impact the others.
#
for sched in $(find tools/sched_ext/build/bin -type f -executable); do
runtest "${sched}"
grep -v " Speculative Return Stack Overflow" /tmp/output | \
sed -n -e '/\bBUG:/q1' \
-e '/\bWARNING:/q1' \
-e '/\berror\b/Iq1' \
-e '/\bstall/Iq1' \
-e '/\btimeout\b/Iq1'
res=$?
if [ ${res} -ne 0 ]; then
echo "FAIL: ${sched}"
exit 1
else
echo "OK: ${sched}"
fi
done

# Run the selftests suite
runtest "tools/testing/selftests/sched_ext/runner"
sed -n -e '/not ok/q1' /tmp/output
res=$?
if [ ${res} -ne 0 ]; then
echo "FAIL: selftests"
echo "output: $(cat /tmp/output)"
else
echo "OK: selftests"
fi
34 changes: 34 additions & 0 deletions .github/workflows/sched-ext.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# sched-ext mandatory options
#
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT=y
CONFIG_DEBUG_INFO_BTF=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
CONFIG_SCHED_CLASS_EXT=y

# Enable scheduling debugging
#
CONFIG_SCHED_DEBUG=y

# Enable extra scheduling features (for a better code coverage while testing
# the schedulers)
#
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SCHED_CORE=y

# Enable fully preemptible kernel for a better test coverage of the schedulers
#
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_COUNT=y
CONFIG_PREEMPTION=y
CONFIG_PREEMPT_DYNAMIC=y
CONFIG_PREEMPT_RCU=y

# Additional debugging information (useful to catch potential locking issues)
#
CONFIG_DEBUG_LOCKDEP=y
CONFIG_DEBUG_ATOMIC_SLEEP=y
56 changes: 56 additions & 0 deletions .github/workflows/test-kernel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: test-kernel
run-name: ${{ github.actor }} PR run
on: [pull_request]
jobs:
test-schedulers:
runs-on: ubuntu-22.04
steps:
### OTHER REPOS ####

# Hard turn-off interactive mode
- run: echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections

# Refresh packages list
- run: sudo apt update

### DOWNLOAD AND INSTALL DEPENDENCIES ###

# Download dependencies packaged by Ubuntu
- run: sudo apt -y install bc gcc make git coreutils cmake elfutils libelf-dev libunwind-dev libzstd-dev linux-headers-generic linux-tools-common linux-tools-generic ninja-build python3-pip python3-requests qemu-kvm udev iproute2 busybox-static libvirt-clients kbd kmod file rsync zstd pahole flex bison cpio libcap-dev libelf-dev python3-dev cargo rustc gcc-multilib

# clang 17
# Use a custom llvm.sh script which includes the -y flag for
# add-apt-repository. Otherwise, the CI job will hang. If and when
# https://github.com/opencollab/llvm-jenkins.debian.net/pull/26 is
# merged, we can go back to using https://apt.llvm.org/llvm.sh.
- run: wget https://raw.githubusercontent.com/Byte-Lab/llvm-jenkins.debian.net/fix_llvmsh/llvm.sh
- run: chmod +x llvm.sh
- run: sudo ./llvm.sh all
- run: sudo ln -sf /usr/bin/clang-17 /usr/bin/clang
- run: sudo ln -sf /usr/bin/llvm-strip-17 /usr/bin/llvm-strip

# Checkout repository
- uses: actions/checkout@v4

# Install virtme-ng
- run: pip install virtme-ng

### END DEPENDENCIES ###

# Build a minimal kernel (with sched-ext enabled) using virtme-ng
- run: vng -v --build --config .github/workflows/sched-ext.config

# Build the selftests suite
- run: make -j $(nproc) -C tools/testing/selftests/sched_ext

# Build the in-kernel schedulers
- run: make -j $(nproc) -C tools/sched_ext

# Setup KVM support
- run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

# Test the schedulers inside the recompile kernel
- run: .github/workflows/run-schedulers
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,6 @@ sphinx_*/

# Rust analyzer configuration
/rust-project.json

# Include ".github" directory
!.github/
8 changes: 8 additions & 0 deletions Documentation/bpf/libbpf/libbpf_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ compilation and skeleton generation. Using Libbpf-rs will make building user
space part of the BPF application easier. Note that the BPF program themselves
must still be written in plain C.

libbpf logging
==============

By default, libbpf logs informational and warning messages to stderr. The
verbosity of these messages can be controlled by setting the environment
variable LIBBPF_LOG_LEVEL to either warn, info, or debug. A custom log
callback can be set using ``libbpf_set_print()``.

Additional Documentation
========================

Expand Down
3 changes: 3 additions & 0 deletions Documentation/bpf/standardization/abi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ The BPF calling convention is defined as:

R0 - R5 are scratch registers and BPF programs needs to spill/fill them if
necessary across calls.

The BPF program needs to store the return value into register R0 before doing an
``EXIT``.
Loading