Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scx_layered: Make layered work in pid namespaces #1099

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

hodgesds
Copy link
Contributor

Add an additional helper function to translate the scx_layered userspace tgid when running in a pid namespace.

Tested by running layered in a separate pid namespace:

$ cargo build --release && sudo unshare --mount-proc --fork -p ./target/release/scx_layered --run-example --stats 1 -vvv

Output from trace:

$ sudo bpftool prog trace | grep tgid
           <...>-242372  [061] ....1 3574039.989305: bpf_trace_printk: CFG layered running with tgid: 242372
$ pidof scx_layered
242372

@hodgesds hodgesds requested review from htejun, JakeHillion, etsal and likewhatevs and removed request for htejun and JakeHillion December 12, 2024 18:57
@hodgesds hodgesds force-pushed the layered-namespace-aware branch 5 times, most recently from 4ae7463 to e3cfe65 Compare December 12, 2024 19:25
Add an additional helper function to translate the scx_layered userspace
tgid when running in a pid namespace.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
@hodgesds hodgesds force-pushed the layered-namespace-aware branch from e3cfe65 to 6879929 Compare December 12, 2024 19:38
@hodgesds hodgesds added this pull request to the merge queue Dec 12, 2024
Merged via the queue into sched-ext:main with commit d3ec7b7 Dec 12, 2024
23 checks passed
@hodgesds hodgesds deleted the layered-namespace-aware branch December 12, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants