Commit Graph

1661 Commits

Author SHA1 Message Date
patso
2e46f71780
generate docs for scx and kernel
generate docs for scx and kernel and push to gh page

this "adds" kernel scheduler and bpf docs to
the generated scx rust docs.
2024-09-09 15:37:59 -04:00
Tejun Heo
249121f15f
Merge pull request #635 from sched-ext/htejun/build
build: Use a single top-level rust workspace
2024-09-08 21:57:27 -10:00
Tejun Heo
b2a71b166e build: Remove unused rust/meson.build
The previous commit makes this file unused but forgot to remove it. Remove
it.
2024-09-08 20:00:35 -10:00
Tejun Heo
56bb963136 build: Use a single top-level rust workspace
Rust build was using two separate workspaces - rust/ and scheds/rust.
There's no reason to separate them and it makes doc generation tricky. Use
single top level workspace so that we can drive all rust building from
cargo.
2024-09-08 14:23:48 -10:00
Andrea Righi
134846c366
Merge pull request #632 from likewhatevs/split-integration-test
split integration test execution
2024-09-08 16:25:10 +02:00
patso
120211d731
split build and test jobs
split build and test jobs to reduce ci turnaround time
and make it clear what is failing when something fails.

also add virtiofsd to deps to make test compilation faster
(most test time is compliation) and remove all force 9ps.
2024-09-08 02:54:24 -04:00
Andrea Righi
92b887c8e4
Merge pull request #629 from sched-ext/scx-rustland-core-fix-crate
scx_rustland_core: move includes back to the lib section
2024-09-07 20:15:10 +02:00
Tejun Heo
10c16cc443
Merge pull request #628 from sched-ext/htejun/release
release: Add cargo-publish.py
2024-09-07 07:50:34 -10:00
Tejun Heo
bc67796658 release: Add cargo-publish.py
A helper script to publish all rust crates in the repo.
2024-09-07 07:34:17 -10:00
Andrea Righi
1e26cb91f1 scx_rustland_core: move includes back to the lib section
Move included artifacts in the lib section (without this change we can't
publish the crate on crates.io).

Fixes: 082bccb ("fix/enable rust tests, make build faster")
Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-07 19:32:08 +02:00
Tejun Heo
fcea4d3729 scx_loader: Fix broken LICENSE symlink 2024-09-07 07:16:22 -10:00
Andrea Righi
155a10d373
Merge pull request #627 from sched-ext/ci-fix-vng-cpu-command
ci: fix vng command to set the right amount of CPUs
2024-09-07 10:11:32 +02:00
Andrea Righi
8ff57ac915 ci: fix vng command to set the right amount of CPUs
The right options to set the amount of CPUs in vng is `-p`, not `-c`.
Change the command to use the long format `--cpu` and `--memory` for
better clarity.

This fixes issue #625.

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-07 09:47:13 +02:00
Changwoo Min
17e0e08e6e
Merge pull request #621 from multics69/lavd-greedy-fix
scx_lavd: improve greedy ratio calculation and more
2024-09-07 10:52:00 +09:00
Tejun Heo
6f8917ceca
Merge pull request #624 from JakeHillion/cleanup-layer_growth_algo
scx_layered: clean up Layer::new layer_growth_algo
2024-09-06 15:10:41 -10:00
Andrea Righi
9301d7d78a
Merge pull request #622 from sched-ext/rustland-core-topology-awareness
scx_rustland_core: introduce topology awareness
2024-09-06 23:11:49 +02:00
Andrea Righi
0a8dc0135b
Merge pull request #623 from likewhatevs/main
fix/enable rust tests, make build faster
2024-09-06 23:11:18 +02:00
Jake Hillion
2c008b2afa scx_layered: clean up Layer::new layer_growth_algo 2024-09-06 18:25:50 +01:00
patso
eaa636dfcc
set vng cpus to 8 for rust tests
set vng cpus to 8 for rust tests (for stability in testing),
update relevant doc test.
2024-09-06 10:07:37 -04:00
Changwoo Min
36df970a8f scx_lavd: add debug print for turbo cores
Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-09-06 19:23:17 +09:00
Changwoo Min
351a1c6656 scx_lavd: enable autopilot mode by default
Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-09-06 19:23:12 +09:00
patso
082bccb557
fix/enable rust tests, make build faster
This commit fixes rust tests and configures ci to
run them on commit. It also sets up CI to run those
in a timely manner by caching dependencies and splitting jobs.
2024-09-06 06:18:11 -04:00
Andrea Righi
8231f8586a scx_rlfifo: better documentation and code readability
Simplify scx_rlfifo code, add detailed documentation of the
scx_rustland_core API and get rid of the additional task queue, since it
just makes the code bigger, slower and it doesn't really provide any
benefit (considering that we are dispatching the tasks in FIFO order
anyway).

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-06 11:25:24 +02:00
Andrea Righi
168fb78387 scx_rustland_core: introduce cache awareness
Introduce some concepts of cache awareness (taken from scx_bpfland).

This change is transparently affecting the BpfScheduler::select_cpu()
API, even if the particular cache topology is not (yet) exposed to the
user-space.

When calling select_cpu() the backend will prioritize idle CPUs that
share the same L2 cache, then the same L3 cache, considering the target
CPU specified in select_cpu() (usually the task's previously used CPU).

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-06 11:25:24 +02:00
Andrea Righi
ed879bae28 scx_rustland_core: expose enq_flags to user-space
Pass the enqueue flags to the user-space scheduler through the
QueuedTask struct.

These flags allow the user-space scheduler to make more informed
scheduling decisions.

Also bump up scx_rustland_core minor version to reflect the new API (we
are not breaking the old API, so we don't need to bump the major version
in this case).

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-06 11:25:24 +02:00
Changwoo Min
ebe9375b6a scx_lavd: pretty printing of status
Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-09-06 16:27:20 +09:00
Changwoo Min
461cb9a3a0 scx_lavd: fix calculation of greedy_ratio
The service time (taskc->svc_time) should be the sum of total CPU time
consumed not jut a delta.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-09-06 16:22:40 +09:00
Tejun Heo
fb35fdb6f2
Merge pull request #620 from sched-ext/htejun/release
version: v1.0.4
2024-09-05 18:13:13 -10:00
Tejun Heo
46fc2e1a49 version: v1.0.4 2024-09-05 18:12:45 -10:00
Tejun Heo
cd555741d0 rust: Synchronize depency versions 2024-09-05 17:10:02 -10:00
Changwoo Min
20e3d998fe
Merge pull request #613 from sirlucjan/readme-lavd-monitor
scx_stats: Add proper logs for LAVD
2024-09-06 09:34:18 +09:00
Changwoo Min
e3243c5d51
Merge pull request #612 from multics69/lavd-monitor
scx_lavd: add --monitor flag and two micro-optimizations
2024-09-06 09:33:55 +09:00
Changwoo Min
d9274bd8e6 scx_lavd: drop time slice boost for big cores
Unexpectedly, little cores, which have relative short time slices, have
more chance to schedule performance-critical tasks. Hence it is better
to keep the time slice same regardless the core types.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-09-06 09:32:38 +09:00
Changwoo Min
fdecba227c scx_lavd: print more info with --monitor
Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-09-06 09:32:31 +09:00
Daniel Hodges
0fa369b914
Merge pull request #619 from hodgesds/stats-fixes
scx_layered: Fix stats typo
2024-09-05 15:44:15 -04:00
Andrea Righi
ee97632d9f
Merge pull request #618 from sched-ext/bpfland-wake-sync
scx_bpfland: optimize producer/consumer workloads
2024-09-05 21:04:53 +02:00
Daniel Hodges
25e1642bbc
scx_layered: Fix stats typo
Small typo fix

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-09-05 14:12:28 -04:00
Andrea Righi
41856aa527
Merge pull request #617 from sirlucjan/bpfland-new-flags
scx-scheds: update bpflands suggested flags
2024-09-05 19:21:17 +02:00
Andrea Righi
918cfc613d scx_bpfland: optimize producer/consumer workloads
When selecting an idle CPU for a task that has been woken up, prioritize
reusing the same CPU if the waker and wakee share the same L3 cache.

Otherwise, attempt to migrate the wakee to the waker's CPU, provided it
is allowed by the wakee's scheduling domain.

This seems to consistently improve FPS performance when the system is
not operating over its full capacity.

Example:
 $ __GL_SYNC_TO_VBLANK=0 vblank_mode=0 glxgears -geometry 800x600

 - before: ~18305.77 FPS
 - after:  ~19060.62 FPS

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-05 19:02:09 +02:00
Andrea Righi
28050dcd7d
Merge pull request #615 from sched-ext/bpfland-auto
scx_bpfland: enable "auto" mode by default
2024-09-05 19:01:50 +02:00
Daniel Hodges
e6ed9b05ba
Merge pull request #614 from hodgesds/layered-stats-fix
scx_layered: Fix stats formatting
2024-09-05 12:54:56 -04:00
Tejun Heo
08619302e8
Merge pull request #607 from sirlucjan/openrc-cleanup
openrc: drop separate logs
2024-09-05 06:54:13 -10:00
Piotr Gorski
51f8c35841
openrc: drop separate logs
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
2024-09-05 18:19:01 +02:00
Piotr Gorski
97864d0b3d
scx_stats: Add proper logs for LAVD
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
2024-09-05 18:18:34 +02:00
Andrea Righi
844c00fd26 scx_bpfland: enable "auto" mode by default
Rename "turbo domain" to "preferred domain", that conceptually is more
generic and introduce the new option `--preferred-domain CPUMASK`, which
allows users to define the preferred domain, specifying a cpumask as a
hex number. By default ("auto") the scheduler will always try to detect
and use the fastest CPUs in the system.

Moreover, adjust the cpufreq logic to use "auto" both with the
"balance_power" and "balance_performance" EPP profiles.

Then, enable "auto" mode by default: the scheduler will try to
automatically determine the optimal primary domain, preferred domain and
cpufreq level, based on the selected scheduler and energy profiles.

Tested-by: Piotr Gorski < piotr.gorski@cachyos.org >
Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-05 16:11:12 +02:00
Piotr Gorski
cde5a39ae0
scx-scheds: update bpflands suggested flags
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
2024-09-05 15:06:21 +02:00
Andrea Righi
239b5194a4
Merge pull request #605 from sched-ext/rustland-core-handle-tctx-error
scx_rustland_core: avoid critical failures due by missing task context
2024-09-05 13:08:56 +02:00
Daniel Hodges
76ad880475
scx_layered: Fix stats formatting
Fix formatting precision of stats to have lower precision for
readability. The existing formatting is hard to read:

tot=   1538 local=31.27 open_idle= 2.73 affn_viol=23.80 proc=4ms
busy=  1.1 util=   16.6 load=     32.7 fallback_cpu=  6
excl_coll=0.06501950585175553 excl_preempt=0.26007802340702213 excl_idle=0.16384915474642392 excl_wakeup=0.25097529258777634

With this fix stats are far more readable formatting:

tot=    441 local=33.56 open_idle= 0.00 affn_viol=20.63 proc=3ms
busy=  0.4 util=    6.3 load=     33.6 fallback_cpu=  6
excl_coll=0.454 excl_preempt=0.000 excl_idle=0.132 excl_wakeup=0.200

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-09-05 06:44:54 -04:00
Andrea Righi
53617042b3 scx_rustland_core: avoid critical failures due by missing task context
Prevent triggering a critical error when a local context for a task
can't be found.

Instead, handle the error gracefully (reporting a warning in debugfs) to
enhance the robustness of the schedulers based on scx_rustland_core.

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-05 10:58:44 +02:00
Changwoo Min
f490a55d54 scx_lavd: accmulate more system-wide statistics
Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-09-05 16:03:14 +09:00