Skip to content

Conversation

@arighi
Copy link
Contributor

@arighi arighi commented Mar 1, 2025

Drop the logic that tries to track user-space futexes and extends task time slices when tasks is holding a user-space lock.

This improves scheduler portability and maintainability across kernel versions. For the scheduler's primary use case (audio/multimedia), the user lock priority boosting provided minimal benefits and sometimes negatively impacted performance predictability by over-prioritizing lock-heavy tasks.

Moreover, conditionally load the remaining kprobe (vfs_fsync_range) to improve scheduler portability and allow to run the scheduler also in kernels where this function is not available.

Drop the logic that tries to track user-space futexes and extends task
time slices when tasks is holding a user-space lock.

This improves scheduler portability and maintainability across kernel
versions. For the scheduler's primary use case (audio/multimedia), the
user lock priority boosting provided minimal benefits and sometimes
negatively impacted performance predictability by over-prioritizing
lock-heavy tasks.

Moreover, conditionally load the remaining kprobe (vfs_fsync_range) to
improve scheduler portability and allow to run the scheduler also in
kernels where this function is not available.

Signed-off-by: Andrea Righi <arighi@nvidia.com>
@arighi arighi force-pushed the flash-drop-user-lock-boost branch from 0bdd32e to ad3d674 Compare March 1, 2025 15:59
@arighi arighi requested review from likewhatevs and multics69 March 1, 2025 17:02
Copy link
Contributor

@likewhatevs likewhatevs left a comment

Choose a reason for hiding this comment

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

Nice, also I'm gonna move a wrapper around copies of that that if-else-unsafe block that are in layered also to a helper in compat which you can use some time later today/tomorrow btw.

@arighi
Copy link
Contributor Author

arighi commented Mar 2, 2025

@likewhatevs I was also wondering why in layered you're not using compat::ksym_exists() and you check /proc/kallsyms directly. Is it because nvidia_open() is in an external module? In that case we should probably fix compat.

@arighi arighi added this pull request to the merge queue Mar 2, 2025
Merged via the queue into main with commit dc8d891 Mar 2, 2025
52 checks passed
@arighi arighi deleted the flash-drop-user-lock-boost branch March 2, 2025 05:52
@likewhatevs
Copy link
Contributor

likewhatevs commented Mar 3, 2025

@likewhatevs I was also wondering why in layered you're not using compat::ksym_exists() and you check /proc/kallsyms directly. Is it because nvidia_open() is in an external module? In that case we should probably fix compat.

compat may just work -- I need to test that and will fix it if it doesn't.

Just confirmed compat doesn't work for nvidia symbols (because they're a module I think, but not certain of that).

From a system w/ nvidia drivers loaded (where the kallsyms approach works):

06:26:53 [WARN] symbol nvidia_open missing, kprobe not loaded
06:26:53 [WARN] symbol nvidia_poll missing, kprobe not loaded
06:26:53 [WARN] symbol nvidia_mmap missing, kprobe not loaded

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.

4 participants