Commit Graph

2182 Commits

Author SHA1 Message Date
Daniel Hodges
ff15f257be scx_layered: Fix formatting
Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-11-12 10:09:22 -08:00
Daniel Hodges
673316827b
Merge pull request #918 from hodgesds/layered-slice-helper
scx_layered: Add helper for layer slice duration
2024-11-11 18:24:43 +00:00
Daniel Hodges
4fb05d9252
Merge pull request #920 from hodgesds/layered-consume-fix
scx_layered: Fix error in dispatch consumption
2024-11-11 16:43:25 +00:00
Daniel Hodges
b2505e74df
Merge branch 'main' into layered-consume-fix 2024-11-11 11:29:43 -05:00
Daniel Hodges
1ed387d7f3 scx_layered: Fix error in dispatch consumption
Fix bug is consume_non_open where it improperly returns 0 when the DSQ
is not consumed.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-11-11 08:19:54 -08:00
Daniel Hodges
cad3413886 scx_layered: Add helper for layer slice duration
Add a helper for returning the appropriate slice duration for a layer
and replace a various instances where the slice value was being
recalculated.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-11-11 06:11:32 -08:00
likewhatevs
835f0d0e6a
Merge pull request #890 from likewhatevs/layered-dsq-timer
scx_layered: add timer antistall
2024-11-09 01:39:35 +00:00
Pat Somaru
89f4aa1351
scx_layered: add antistall
add timer based antistall to scx_layered and new flags
to enable/disable and specify seconds of delay before
it turns on.

also update ci config to make sure this verifies/runs.
2024-11-08 20:31:02 -05:00
Tejun Heo
38512bfce8
Merge pull request #916 from sched-ext/htejun/scx_layered-verifier-workaround
scx_layered: Work around older kernels choking on function calls from…
2024-11-08 19:37:36 +00:00
Tejun Heo
bb91ad0084 scx_layered: Work around older kernels choking on function calls from sleepable progs
Verifier in older kernels choke on function calls from sleepable progs
triggering non-sensical RCU state error:

   frame1: R1_w=scalar(id=674,smin=smin32=0,smax=umax=smax32=umax32=51,var_off=(0x0; 0x3f)) R10=; return *llc_ptr;
  1072: (61) r0 = *(u32 *)(r2 +0)       ; frame1: R0_w=scalar(smin=0,smax=umax=0xffffffff,var_off=(0x0; 0xffffffff)) R2_w=map_value(map=bpf_bpf.rodata,ks=4,vs=9570,off=4400,smin=smin32=0,smax=umax=smax32=umax32=204,var_off=(0x0; 0xfc)) refs=13,647
  ; }
  1073: (95) exit
  bpf_rcu_read_unlock is missing
  processed 10663 insns (limit 1000000) max_states_per_insn 8 total_states 615 peak_states 281 mark_read 20
  -- END PROG LOAD LOG --

Work around by adding and using __always_inline variant of cpu_to_llc_id()
from layered_init(). Note that we can't switch everyone to __always_inline
as that can lead to verification failure due to ins limit.
2024-11-08 08:47:57 -10:00
Changwoo Min
5280206fed
Merge pull request #915 from LohithCV/lavd_doc_err
scx_lavd: docs: fix typos
2024-11-08 20:41:40 +09:00
Lohith C V
a2e119ae23 scx_lavd: docs: fix typos 2024-11-08 16:25:55 +05:30
Daniel Hodges
007fed04c8
Merge pull request #913 from hodgesds/layered-fallback-dump
scx_layered: Add fallback costs to dump
2024-11-08 01:06:14 +00:00
Daniel Hodges
3b47782bf4 scx_layered: Add fallback costs to dump
Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-11-07 19:49:09 -05:00
Daniel Hodges
73926d6481
Merge pull request #912 from hodgesds/layered-mask-cleanup
scx_layered: Cleanup cpumask
2024-11-07 22:52:28 +00:00
5ae1b84533
Merge pull request #908 from JakeHillion/pr908
layered/topo: lift layer specific checks out of per-LLC loop
2024-11-07 21:48:20 +00:00
Daniel Hodges
ee4fd3dace scx_layered: Cleanup cpumask
Cleanup remaining cpumasks to use `cast_mask`.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-11-07 13:18:10 -08:00
Daniel Hodges
9a282e001f
Merge pull request #911 from hodgesds/layered-idle-smt-cleanup
scx_layered: Use layer idle_smt option
2024-11-07 21:12:24 +00:00
Daniel Hodges
637fc3f6e1 scx_layered: Use layer idle_smt option
When selecting the idle CPU use the idle_smt option on the layer. This
may improve cache locality in some cases by placing tasks on CPUs that
are on closer cache lines.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-11-07 13:05:19 -08:00
Tejun Heo
f71a9d0d38
Merge pull request #910 from hodgesds/layered-cost-verifier-fix
scx_layered: Fix verifier issue on older kernels
2024-11-07 20:34:37 +00:00
Daniel Hodges
7db2ef22d0 scx_layered: Fix verifier issue on older kernels
On some older kernels layered fails to validate. Prevent certain helpers
from being inlined to pass the verifier.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-11-07 12:20:58 -08:00
Jake Hillion
ba54808150 layered/topo: lift layer specific checks out of per-LLC loop
The loops in topology aware mode were recently refactored to place the -per-LLC
loops inside the per-layer loops. However, the layer specific checks were left
in the inner loops, slowing this down unnecessarily.

Pull the layer specific checks from the inner loop into the outer loop.

Also changes these functions to `__weak` to ensure they don't get inlined -
they're expected to be verified as global functions.

Note to reviewers: this looks good to me, but I'd appreciate if you reviewed
the De Morgan applications in detail.

Test plan:
- `cargo build --release && sudo target/release/scx_layered --run-example` on a
  machine with multiple LLCs. It's possible to stall it quite easily with
  stress-ng but I believe this is the case on main.
2024-11-07 18:34:44 +00:00
Andrea Righi
218cbeac1e
Merge pull request #907 from sched-ext/scx-loader-update-bpfland-options
scx_loader: tune scx_bpfland default options
2024-11-07 18:04:13 +00:00
Andrea Righi
191cc7fe8b scx_loader: tune scx_bpfland default options
With the recent rework of scx_bpfland the default options for the
different profiles in scx_loader are not valid anymore.

Update them with some appropriate options.

Signed-off-by: Andrea Righi <arighi@nvidia.com>
2024-11-07 17:54:13 +01:00
Changwoo Min
416de68b72
Merge pull request #904 from multics69/lavd-drop-padding
scx_lavd: drop padding in cpdom_cpumask, which was a workaround
2024-11-07 16:13:07 +00:00
Changwoo Min
56357a79db
Merge pull request #903 from multics69/lavd-issue-897
scx_lavd: update cur_logical_clk atomically
2024-11-07 16:12:56 +00:00
Daniel Hodges
d7e1f697e0
Merge pull request #906 from hodgesds/layered-verifier-fix
scx_layered: Fix verifier issue when tracing
2024-11-07 14:51:15 +00:00
Daniel Hodges
3cc849f234 scx_layered: Fix verifier issue when tracing
Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-11-07 06:43:40 -08:00
Daniel Hodges
d6ba3b79d7
Merge pull request #896 from hodgesds/layered-dsq-cost
scx_layered: Add fallback DSQ cost accounting
2024-11-07 13:35:04 +00:00
Daniel Hodges
487baa4a03 scx_layered: Add fallback DSQ cost accounting
Add fallback DSQ cost accounting so that fallback DSQ costs are
accounted for and so that dispatch of fallback DSQs can be done in a
standardized way.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2024-11-07 05:25:57 -08:00
likewhatevs
debe991b26
Merge pull request #905 from likewhatevs/kconfig-cache-update
add CONFIG_IKCONFIG to ci Kconfig and bump cache ver
2024-11-07 08:35:27 +00:00
Pat Somaru
27a506f5f7
add CONFIG_IKCONFIG to ci Kconfig and bump cache ver 2024-11-07 03:13:21 -05:00
Changwoo Min
22cb9e9ce1 scx_lavd: drop padding in cpdom_cpumask, which was a workaround
The verifier error seems to stem from the wrong vmlinux.h.
Also, PR #889 seems to completely fix the problem.
So, drop the workaround.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-11-07 16:13:06 +09:00
Changwoo Min
e9ba2d53fa scx_lavd: update cur_logical_clk atomically
Previously, the cur_logical_clk is updated with WIRTE_ONCE(),
which does not guarantee the atomicity when concurrent writes happen
-- which is possible. So change it using CAS (compare-and-swap).

Signed-off-by: Changwoo Min <changwoo@igalia.com>
2024-11-07 16:01:50 +09:00
likewhatevs
d0111b3af9
Merge pull request #900 from likewhatevs/enable-iconfig-proc
add CONFIG_IKCONFIG_PROC to ci kconfig
2024-11-07 06:39:08 +00:00
Emil Tsalapatis
b962ea8c35
Merge pull request #894 from etsal/core_enums
introduce CO:RE enum readers and use them for scx_central
2024-11-07 02:17:45 +00:00
Emil Tsalapatis
5e35a12ce3 remove stray print 2024-11-06 18:02:08 -08:00
Emil Tsalapatis
7d44511422 fix missing/extraneous newline 2024-11-06 12:52:10 -08:00
Emil Tsalapatis
42880404e1 Merge branch 'main' of https://github.com/sched-ext/scx into core_enums 2024-11-06 12:44:23 -08:00
Emil Tsalapatis
de5f2f9c8d regenerate autogen Rust file 2024-11-06 12:21:16 -08:00
Emil Tsalapatis
f088540647 fix linting error in autogenerated code 2024-11-06 12:20:11 -08:00
Emil Tsalapatis
2f174db96f use the enum singleton in the userspace scheduler components 2024-11-06 12:17:16 -08:00
Emil Tsalapatis
1cabed9d09 Autogenerate enums and BPF enum setters for Rust schedulers 2024-11-06 12:17:16 -08:00
Emil Tsalapatis
d500c50098 add autogenerated enum definitions for Rust schedulers 2024-11-06 12:17:16 -08:00
Tejun Heo
607dfab7e9
Merge pull request #902 from sched-ext/htejun/release
version: v1.0.6 Cargo.lock updates
2024-11-06 19:45:36 +00:00
Tejun Heo
2fca9e38a5 version: v1.0.6 Cargo.lock updates 2024-11-06 09:27:52 -10:00
Dan Schatzberg
fb635cb8f0
Merge pull request #438 from dschatzberg/mitosis
Refactor select_cpu + enqueue for proper synchronization and handle of !wakeup
2024-11-06 18:36:05 +00:00
Pat Somaru
fc6ad5ca1b
add CONFIG_IKHEADERS_PROC to ci kconfig
do this to enable the following to work on ci:

extern unsigned CONFIG_HZ __kconfig;
2024-11-06 12:56:32 -05:00
Andrea Righi
f402f118db
Merge pull request #899 from sched-ext/bpfland-rework
scx_bpfland: rework
2024-11-06 17:55:36 +00:00
Tejun Heo
426062704d
Merge pull request #901 from sched-ext/htejun/release
version: v1.0.6
2024-11-06 17:15:31 +00:00