Commit Graph

1890 Commits

Author SHA1 Message Date
Tejun Heo
5422584baa scx_utils::BpfBuilder: Add 'static to BPF_H_TAR definition
Newer rustc is unhappy about lack of explicit lifetime parameter.
2023-12-05 14:15:06 -10:00
Tejun Heo
dd70d89b73
Merge pull request #3 from sched-ext/global_dsq
scx_simple: Don't vtime dispatch to SCX_DSQ_GLOBAL
2023-12-04 15:28:20 -10:00
David Vernet
13586dc2ab scx_simple: Don't vtime dispatch to SCX_DSQ_GLOBAL
SCX_DSQ_GLOBAL now does not support vtime dispatching. scx_simple uses
it to do vtime scheduling, so let's update it to create and use a
separate DSQ that it can both FIFO and PRIQ dispatch to.

Signed-off-by: David Vernet <void@manifault.com>
2023-12-04 18:06:47 -06:00
David Vernet
4fef4ed7dd
Merge pull request #2 from sched-ext/misc-fixes
scx_layered: Iteration fix for upstream p->thread_group removal
2023-12-04 15:25:13 -06:00
Tejun Heo
c42ba105ca scx_layered: Use p->thread_node to iterate threads in tp_cgroup_attach_task()
tp_cgroup_attach_task() walks p->thread_group to visit all member threads
and set tctx->refresh_layer. However, the upstream kernel has removed
p->thread_group recently in 8e1f385104ac ("kill task_struct->thread_group")
as it was mostly a duplicate of p->signal->thread_head list which goes
through p->thread_node.

Switch to iterate via p->thread_node instead, add a comment explaining why
it's using the cgroup TP instead of scx_ops.cgroup_move(), and make
iteration failure non-fatal as the iteration is racy.
2023-12-04 10:58:06 -10:00
Tejun Heo
d6742a9b1b scx_rusty: Add comment explaining spurious delete_elem failures 2023-12-04 10:51:05 -10:00
David Vernet
d6b978da09
Merge pull request #1 from sched-ext/fix-rusty-eexist
scx_rusty: Work around spurious task_ctx update failures
2023-12-04 11:43:34 -06:00
Tejun Heo
306a20bad3
Update README.md
Match repo about section.
2023-12-03 15:57:39 -10:00
Tejun Heo
66150490a1 scx_rusty: Work around spurious task_ctx update failures
As in scx_layered, bpf_map_delete_elem() can fail due to recursion
protection triggering spuriously which can then lead to task_ctx creation
failure after PIDs wrap. Work around by dropping BPF_NOEXIST.
2023-12-03 15:46:29 -10:00
Tejun Heo
bf186f95f3 sync-to-kernel.sh: Drop unused shopt globstar 2023-12-03 15:35:15 -10:00
Tejun Heo
255f614615 sync-to-kernel.sh: Updated to sync to kernel and renamed accordingly
The scx repo is going to serve as the source of truth for sched_ext
schedulers. Reverse the sync direction and include syncing rust-user
schedulers too.
2023-12-03 15:34:26 -10:00
Tejun Heo
1a4734bb4c scx_flatcg: Drop unnecessary include 2023-12-03 14:22:59 -10:00
Tejun Heo
fcab460386 scx_utils: Bump version and publish
include directory structure has changed (a breaking change) and the doc had
a misleading error. Let's cut a new release.
2023-12-03 12:51:16 -10:00
Tejun Heo
d0ed7913b4 scheds: Rearrange include files to match kernel/tools/sched_ext/include
Build scripts are updated accordingly.
2023-12-03 12:47:23 -10:00
Tejun Heo
ecd485ed3e Add LICENSE (GPL-2.0) 2023-12-03 12:04:02 -10:00
Tejun Heo
1cd84fcea5 doc: minor 2023-12-03 11:54:06 -10:00
Tejun Heo
16f248cc52 doc: Formatting 2023-12-03 11:51:53 -10:00
Tejun Heo
44b811831a doc: README.md and OVERVIEW.md added and other minor updates 2023-12-03 11:48:55 -10:00
Tejun Heo
12a90335b3 scx_utils: Bump version to 0.2.1 2023-12-02 23:56:51 -10:00
Tejun Heo
b38f7574ac scx_utils: Documentation and other minor updates 2023-12-02 23:56:36 -10:00
Tejun Heo
41a4f6407e build: Add dummy gnu/stubs.h to fix build on systems without 32bit glibc-dev
See comment in sched/include/bpf-compat/gnu/stubs.h for details.
2023-12-02 13:25:02 -10:00
Tejun Heo
e030d0c816 build: Ensure meson version >= 1.2 2023-12-02 08:09:00 -10:00
Tejun Heo
2af20dead9 scx_utils::BpfBuilder: Add '-target bpf' to clang_args when calling bindgen
bpf_cflags doesn't contain '-target bpf' because SkeletonBuilder does so
internally. However, bindgen doesn't and we end up specifying options which
are specific to bpf target without actually specifying the target, this
leads to warnings like the followings:

  [scx_layered 0.0.1] warning: unknown warning option '-Wno-compare-distinct-pointer-types''; did you mean '-Wno-compare-distinct-pointer-types'? [-Wunknown-warning-option]
  [scx_layered 0.0.1] clang diag: warning: argument unused during compilation: '-mcpu=v3' [-Wunused-command-line-argument]
  [scx_layered 0.0.1] clang diag: warning: unknown warning option '-Wno-compare-distinct-pointer-types''; did you mean '-Wno-compare-distinct-pointer-types'? [-Wunknown-warning-option]

Fix it by adding '-target bpf' when invoking bindgen.
2023-12-02 07:23:27 -10:00
Tejun Heo
0f1ed894bd build: rust projects now link against libbpf.a if provided 2023-12-02 06:41:26 -10:00
Tejun Heo
30f6a38573 build: Pipe down build options to scx_utils::BuildHelpers using env vars 2023-12-01 14:49:32 -10:00
Tejun Heo
6b9c392bf0 build: "meson install" works now 2023-12-01 13:37:28 -10:00
Tejun Heo
8fb4fbf54d build: Propagate buildtype==release to cargo 2023-12-01 12:15:16 -10:00
Tejun Heo
a55fc6893b build: Trigger cargo build on rust sub-projects from meson.build 2023-12-01 11:58:56 -10:00
Tejun Heo
6ec509b3b6 build, scx_utils: Misc improvements
- build: Check clang version like scx_utils does.

- scx_utils: Generate rerun-if-env-changed directives.
2023-12-01 10:20:06 -10:00
Tejun Heo
01d8351616 rustu: Import scx_rusty and scx_layered from kernel tree 2023-11-30 13:13:41 -10:00
Tejun Heo
30b40ac4d3 bpf_builder: It can now compile scx_rusty and scx_layered both within and outside kernel tree 2023-11-30 13:05:29 -10:00
Tejun Heo
5e93a0f8ff scx_utils: bpf_builder: Rename and restructure 2023-11-29 21:07:33 -10:00
Tejun Heo
93f571f64b scx_utils: Merge bpf_h.rs into build_helpers.rs 2023-11-29 10:37:19 -10:00
Tejun Heo
e1600a70ba scx_utils: Add build_helpers 2023-11-29 08:22:54 -10:00
Tejun Heo
f032cfc679 scx_utils: Add mod bpf_h 2023-11-28 15:20:01 -10:00
Tejun Heo
302ea57798 scheds: Remove now unnecessary ravg_read.rs.h and relocate sync script 2023-11-28 08:55:41 -10:00
Tejun Heo
03aae04f1a scx_utils: Initial repo creation with ravg_read 2023-11-28 08:48:02 -10:00
Tejun Heo
daa241c515 Add sync-from-kernel.sh 2023-11-27 15:40:34 -10:00
Tejun Heo
800b9f9ebb build: Warn about RESIZE_ARRAY breakage if libbpf<1.3 2023-11-27 15:02:33 -10:00
Tejun Heo
68b6d37800 scx: Initial repo setup and import of example schedulers from kernel tree 2023-11-27 14:47:04 -10:00