Skip to content

Commit 11c6a80

Browse files
authored
Merge pull request #12 from sched-ext/scx_nest
scx_nest: Add scx_nest scheduler
2 parents cd6d45d + ca21842 commit 11c6a80

File tree

8 files changed

+1002
-0
lines changed

8 files changed

+1002
-0
lines changed

scheds/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ of schedulers:
2222
schedulers that are also shipped with the Linux kernel tree.
2323
- [rust-user](rust-user/README.md) describes all of the schedulers with rust
2424
user space components. All of these schedulers are production ready.
25+
- [c-user](c-user/README.md) describes all of the schedulers with C user space
26+
components. All of these schedulers are production ready.
2527

2628
## Note on syncing
2729

scheds/c-user/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
EXAMPLE SCHEDULERS
2+
==================
3+
4+
# Introduction
5+
6+
This directory contains sched_ext schedulers with C user-space components.
7+
8+
This document will give some background on each such scheduler, including
9+
describing the types of workloads or scenarios they're designed to accommodate.
10+
For more details on any of these schedulers, please see the header comment in
11+
their .bpf.c file.
12+
13+
# Schedulers
14+
15+
This section lists, in alphabetical order, all of the current example
16+
schedulers.
17+
18+
--------------------------------------------------------------------------------
19+
20+
## scx_nest
21+
22+
### Overview
23+
24+
A scheduler based on the following Inria-Paris paper: [OS Scheduling with Nest:
25+
Keeping Tasks Close Together on Warm
26+
Cores](https://hal.inria.fr/hal-03612592/file/paper.pdf). The core idea of the
27+
scheduler is to make scheduling decisions which encourage work to run on cores
28+
that are expected to have high frequency. This scheduler currently will only
29+
perform well on single CCX / single-socket hosts.
30+
31+
### Typical Use Case
32+
33+
scx_nest is designed to optimize workloads that CPU utilization somewhat low,
34+
and which can benefit from running on a subset of cores on the host so as to
35+
keep the frequencies high on those cores. Some workloads may perform better by
36+
spreading work across many cores to avoid thrashing the cache, etc. Determining
37+
whether a workload is well-suited to scx_nest will likely require
38+
expermentation.
39+
40+
### Production Ready?
41+
42+
This scheduler could be used in a production environment, assuming the hardware
43+
constraints enumerated above.

scheds/c-user/meson.build

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
c_scheds = ['scx_nest']
2+
3+
foreach sched: c_scheds
4+
bpf_o = gen_bpf_o.process(sched + '.bpf.c', extra_args: bpf_includes)
5+
bpf_skel = gen_bpf_skel.process(bpf_o)
6+
executable(sched, [bpf_skel, sched + '.c'],
7+
include_directories: [user_c_includes],
8+
dependencies: libbpf_dep,
9+
install: true)
10+
endforeach

0 commit comments

Comments
 (0)