Commit Graph

1816 Commits

Author SHA1 Message Date
Changwoo Min
b1070449b2
Merge pull request #714 from multics69/lavd-hotplug
scx_lavd: support CPU hotplug correctly
2024-10-03 07:35:25 +09:00
Tejun Heo
a835664e4e
Merge pull request #724 from sched-ext/htejun/release
version: Cargo.lock update
2024-10-02 21:19:00 +00:00
Tejun Heo
78682438a5 version: Cargo.lock update 2024-10-02 11:18:07 -10:00
Tejun Heo
0b4c8bcf4b
Merge pull request #722 from sched-ext/htejun/release
v1.0.5
2024-10-02 18:58:14 +00:00
Tejun Heo
7402895f4a version: v1.0.5 2024-10-02 08:34:57 -10:00
Tejun Heo
60c9ae7e7d version-tool.py: Ignore root Cargo.toml
No need to process it and it confuses the script.
2024-10-02 08:32:22 -10:00
Daniel Hodges
054352f172
Merge pull request #716 from vax-r/lavd_typo
scx_lavd: Fix typo
2024-10-02 13:21:15 +00:00
likewhatevs
cc26b988be
Merge pull request #717 from vax-r/rusty_cleanup
scx_rusty: Delete unused function variable
2024-10-02 09:01:25 -04:00
likewhatevs
6fc90340f8
Merge pull request #718 from parttimenerd/patch-1
Mention wiki in the README
2024-10-02 08:59:04 -04:00
Johannes Bechberger
1ab402b4c7
Update README.md 2024-10-02 12:41:50 +02:00
I Hsin Cheng
3055716382 scx_rusty: Delete unused function variable
"struct task_struct *p" isn't used within the function
"task_load_adj()". Delete the function parameter for cleaner code.

Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
2024-10-02 17:49:13 +08:00
I Hsin Cheng
7fbef2aa0b scx_lavd: Fix typo
Fix "alreay" to "already".

Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
2024-10-02 17:39:10 +08:00
Changwoo Min
770a59f69d scx_lavd: support CPU hotplug correctly
Use scx_utils::NR_CPU_IDS to iterate whole CPUs and separately count the
number of online CPUs to support CPU hotplug correctly.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-10-02 14:19:18 +09:00
Changwoo Min
fb7bc0a850 scx_lavd: fix incorrect preemtability test
Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-10-02 13:24:43 +09:00
Daniel Hodges
073984fafb
Merge pull request #712 from minosfuture/main
Add #stat_doc attribute macro to Stats structs
2024-10-01 12:28:51 +00:00
Ming Yang
445743487a Add #stat_doc attribute macro to Stats struct
`#stat_doc` extends the document from stat desc property.

Add this attribute macro to the remaining Stats structs.

Signed-off-by: Ming Yang <minos.future@gmail.com>
2024-09-30 22:12:11 -07:00
Daniel Hodges
14ab9dcfd6
Merge pull request #711 from hodgesds/layered-type-cleanup
scx_layered: Fix compiler warnings
2024-10-01 02:13:24 +00:00
Daniel Hodges
c897511c62
scx_layered: Fix compiler warnings
Cleanup various compiler warnings.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-09-30 20:59:24 -04:00
Tejun Heo
0dda8de2b0
Merge pull request #707 from CachyOS/scx-loader-dbus-introspection
scx_loader: Add D-Bus Introspection XML
2024-09-30 19:27:15 +00:00
Tejun Heo
04648bc511
Merge pull request #703 from minosfuture/main
scx_stats: Implement macro #stat_doc to autogen doc from stat desc
2024-09-30 17:58:56 +00:00
Andrea Righi
bd861507f7
Merge pull request #709 from sched-ext/bpfland-small-fixes
scx_bpfland small fixes and improvements
2024-09-30 17:40:15 +00:00
Andrea Righi
e966455af2 scx_bpfland: fix task_avg_nvcsw() return type
task_avg_nvcsw() was incorrectly returning a bool instead of u64,
limiting the impact of the lowlatency boost.

Fix it by returning the proper type (u64).

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-30 14:36:32 +02:00
Andrea Righi
6e24fcc7f0 scx_bpfland: keep tasks running on full-idle SMT cores
When a task is the last one running on a CPU and still wants to
continue, allow it to run and replenish its time only if the used CPU is
part a fully idle SMT core.

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-30 14:36:32 +02:00
Andrea Righi
c20a19c946 scx_bpfland: always give tasks a chance to run on an idle CPU
During ttwu, the kernel may decide to skip ->select_task_rq() (e.g.,
when only one CPU is allowed or migration is disabled). This causes to
call ops.enqueue() directly without having a chance to call
ops.select_cpu().

Therefore, introduce a new flag (select_cpu_done) in the local task
context to determine if ops.select_cpu() was bypassed and, in that case,
attempt to find an idle CPU directly from ops.enqueue().

In the future this information will be supplied by the kernel through a
special enqueue flag (SCX_ENQ_CPU_SELECTED) [1]. However, the custom
flag in the local task context ensures to reliably determine the same
information, even on older kernels where this flag is not available.

[1] https://lore.kernel.org/lkml/20240928003840.GA2717@maniforge/T

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-30 14:36:19 +02:00
Andrea Righi
55913e7f2f
Merge pull request #706 from sched-ext/rustland-core-drop-setaffinity-workaround
Revert "scx_rustland_core: prevent deadlock with per-CPU DSQs and CPU…
2024-09-30 12:22:25 +00:00
Daniel Hodges
940746a6f4
Merge pull request #708 from hodgesds/layered-cleanup
scx_layered: Fix cache initialization
2024-09-30 09:20:47 +00:00
Daniel Hodges
bb560088de
scx_layered: Fix cache initialization cpumask
Fix a bug in cache initialization where the first node would repeated
get all CPUs added to the mask. Refactor some consts to be more clear.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-09-29 22:10:08 -04:00
Vladislav Nepogodin
6df06c5569
scx_loader: Add D-Bus Introspection XML
XML can be used for code generation like `gdbus-codegen`,`zbus-xmlgen`

refs:
- https://dbus2.github.io/zbus/client.html
- https://docs.gtk.org/gio/migrating-gdbus.html#generating-code-and-docs
- https://dbus.freedesktop.org/doc/dbus-api-design.html
- https://dbus.freedesktop.org/doc/dbus-specification.html
2024-09-30 03:28:30 +04:00
Andrea Righi
302dadd1ae Revert "scx_rustland_core: prevent deadlock with per-CPU DSQs and CPU affinity"
It seems that with the latest kernel the per-CPU DSQ stall while
executing sched_setaffinity() doesn't happen anymore.

Therefore, get rid of the temporary workaround introduced by commit
86db45f ("scx_rustland_core: prevent deadlock with per-CPU DSQs and CPU
affinity") and restore the old behavior, which offers more fair
scheduling policy.

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-29 14:42:41 +02:00
Changwoo Min
896ff0e687
Merge pull request #704 from multics69/lavd-ci-fix
scx_lavd: fix two potential bugs
2024-09-29 09:18:41 +09:00
Changwoo Min
ade6931bfc scx_lavd: fix incorrect neighbor_bit initialization
Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-09-29 02:27:40 +09:00
Changwoo Min
6d116208c8 scx_lavd: do not perform the victim selection for an invalid cpu
When finding a victim candidate for preemption, a randomly chosen
candidate could be out of valid CPU range due to CPU offline, etc. In
this case, try another CPU randomly.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-09-29 02:22:18 +09:00
Ming Yang
28bfd2986a scx_stats: Implement #stat_doc to autogen doc from stat desc
The doc of scx_layered `Opt` is out of sync.

Implement attribute macro #stat_doc to generate doc from the `desc`
property.

Apply #stat_doc to `LayerStats` and `SysStats in scx_layered.

Signed-off-by : Ming Yang <minos.future@gmail.com>
2024-09-28 09:32:48 -07:00
Changwoo Min
e8ebc09ced
Merge pull request #702 from multics69/lavd-dyn-pc-thr
scx_lavd: more accurately determine the performance criticality threshold
2024-09-28 04:35:45 +00:00
Tejun Heo
c19b391c9a
Merge pull request #693 from CachyOS/feature/scx-loader-systemd-service
scx_loader: Add systemd service and on-DBUS launch
2024-09-27 20:13:01 +00:00
Vladislav Nepogodin
9b5e8da8e3
scx_loader: Add systemd service and on-DBUS launch
- add ability to start loader at system start as a service

- add ability to automatically launch on DBUS call whenever third-party
calls the interface

ref: "Example 7. DBus services" https://www.freedesktop.org/software/systemd/man/256/systemd.service.html
2024-09-27 23:51:28 +04:00
Changwoo Min
cd7846f4d2 scx_lavd: more accurately determine the performance criticality threshold
We used the average performance criticality of tasks as a threshold to
determine the proper core type (big or little). However, if the big
core's compute capacity is not half of the total compute capacity, such
an average-based determination becomes suboptimal. If fewer tasks are
classified as performance-critical tasks and requested to run on big
cores, the big cores would be wasted by stealing arbitrary
non-performance-critical tasks. That could result in performance
instability.

Hence, determine the threshold more accurately by considering (active)
big cores' compute capacity and the (approximated) distribution of
performance criticality of tasks.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-09-27 16:56:30 +09:00
Changwoo Min
f07023e42b scx_lavd: rename avg_perf_cri to thr_perf_cri
As a preparation to improve the performance criticality logic, we first
rename "avg_perf_cri" to "thr_perf_cri" since average is no longer the
threshold.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-09-27 13:12:20 +09:00
likewhatevs
1967328d34
Merge pull request #700 from likewhatevs/fix-artifact-names
fix artifact names to work with merge queue naming
2024-09-26 14:38:03 -04:00
Pat Somaru
49a1e8fb2a
fix artifact names to work with mergequeue naming 2024-09-26 14:33:38 -04:00
9afd645f3b
Merge pull request #699 from JakeHillion/pr699
dev_guide: document cargo fmt
2024-09-26 17:24:32 +00:00
Jake Hillion
64f64dc8bc dev_guide: document cargo fmt 2024-09-26 17:48:51 +01:00
Jake Hillion
b89f3fe70b
ci: enable on merge_group action (#698)
Enabling the `caching-build` workflow on `merge_group` actions. This is required to enable merge queues which should make merging lots of PRs while getting full CI testing possible. Currently `lint` is the only required check but we will add more in future.
2024-09-26 17:40:47 +01:00
Daniel Hodges
326ccb3385
Merge pull request #696 from hodgesds/layered-growth-fixes
scx_layered: Fix idle core selection
2024-09-26 11:59:19 -04:00
likewhatevs
2f0424acf3
Merge pull request #697 from likewhatevs/cache-ci-less-2
do not cache fast jobs dependencies (to maintain slow dependencies caches)
2024-09-26 11:33:21 -04:00
Pat Somaru
e6e91f8755
do not cache fast jobs dependencies 2024-09-26 11:27:08 -04:00
likewhatevs
bf68679d35
Setup "debugging" and misc cleanup (#695)
* Fix a couple of misc errors in build scripts.
* Tweak scripts/kconfigs to make bpftrace work.
* Update how CI caching works to make builds faster (6 minute turnaround
  time)
* Update CI config to generate per-scheduler debug archives w/ guest
  dmesg/scheduler stdout, guest stdout, bpftrace script output,
  veristat output.

* Update build scripts to accept the following:
** VNG RW -- write to host filesystem (better caching, logging).
* For stress tests in particular (via ini config):
** QEMU Opts -- to facilitate reproducing bugs (i.e. high core count).
** bpftrace scripts -- specify bpftrace scripts to run during stress
tests.
2024-09-26 11:11:10 -04:00
Daniel Hodges
d1b425d1fa scx_layered: Fix idle core selection
Fix idle core selection to correctly use pick_idle_cpu_from.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-09-26 07:46:26 -07:00
Tejun Heo
818e829e01
Merge pull request #692 from sched-ext/htejun/sync-kernel
Sync from kernel and re-enable scx_flatcg and scx_pair
2024-09-25 13:04:23 -10:00
Tejun Heo
540576ac30 scheds/c: Re-enable scx_flatcg and scx_pair
cgroup support is availale again, re-enable scx_flatcg and scx_pair.
2024-09-25 12:38:45 -10:00