Skip to content

scx_chaos: separate kprobe delays #2435

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

Conversation

yaakov-stein
Copy link
Collaborator

Previously, kprobe random delays where tied to the standard random delays. This also included a bug where one would be required to set the random delay frequency argument, even after setting the kprobe delay frequency argument.

This PR decouples kprobe delays from random delays by creating a new "trait" (it still is triggered differently than the other traits and is not placed into the trait array) and adding independent args for kprobes. This also allows one to use random delays and kprobe delays with different settings.

Testing:

  • Ran scx_chaos --stats 1 --kprobes-for-random-delays schedule --kprobe-random-delay-min-us 100 --kprobe-random-delay-max-us 10000 for > 30 minutes, once with default frequency and once with --kprobe-random-delay-frequency .5. Statistics show that kprobe delays occur regularly and the numbers line up with the different frequencies.

@yaakov-stein yaakov-stein requested review from JakeHillion and hodgesds and removed request for JakeHillion July 21, 2025 02:45
Copy link
Contributor

@JakeHillion JakeHillion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@yaakov-stein yaakov-stein added this pull request to the merge queue Jul 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 21, 2025
@yaakov-stein yaakov-stein added this pull request to the merge queue Jul 21, 2025
Merged via the queue into sched-ext:main with commit d71e415 Jul 21, 2025
23 of 25 checks passed
@yaakov-stein yaakov-stein deleted the ystein/scx_chaos_seperate_kprobe_delays branch July 21, 2025 16:30
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