Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

scx: Fix CPU online tracking #215

Closed
wants to merge 1 commit into from
Closed

scx: Fix CPU online tracking #215

wants to merge 1 commit into from

Conversation

Byte-Lab
Copy link
Collaborator

Commit 10d167d ("SCX: Synchronize boot CPU's online state with SCX_RQ_ONLINE") fixes the oversight that we're not synchronizing the boot CPU's online state with scx_rq's online state. It does this by adding a check in init_sched_ext_class() for whether a CPU is online, and setting the SCX_RQ_ONLINE flag in the rq if it is.

The online mask may not be initialized by the time init_sched_ext_class() is invoked, so let's add a late init function where we iterate over the possible CPUs and do this check there.

Commit 10d167d ("SCX: Synchronize boot CPU's online state with
SCX_RQ_ONLINE") fixes the oversight that we're not synchronizing the boot CPU's
online state with scx_rq's online state. It does this by adding a check in
init_sched_ext_class() for whether a CPU is online, and setting the
SCX_RQ_ONLINE flag in the rq if it is.

The online mask may not be initialized by the time init_sched_ext_class() is
invoked, so let's add a late init function where we iterate over the possible
CPUs and do this check there.

Signed-off-by: David Vernet <void@manifault.com>
@Byte-Lab Byte-Lab requested a review from htejun May 31, 2024 16:13
Copy link
Contributor

@sirlucjan sirlucjan left a comment

Choose a reason for hiding this comment

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

The system under load behaved smoothly, no clipping, no loss of responsiveness. It looks like the bug reported by me and @ptr1337 has been fixed

@ptr1337
Copy link

ptr1337 commented May 31, 2024

Can confirm, this patch fixes the sched-ext regression.

Tested-by: Peter Jung ptr1337@cachyos.org

@sirlucjan
Copy link
Contributor

Tested-by: Piotr Gorski piotrgorski@cachyos.org

@Byte-Lab
Copy link
Collaborator Author

Byte-Lab commented Jun 1, 2024

Hmm, multiple CachyOS users (using x86) are swearing that this PR improves interactivity over @htejun's original fix. I'm confused as to why, as it should have been a no-op. Will have to look more closely next week.

@Byte-Lab
Copy link
Collaborator Author

Byte-Lab commented Jun 2, 2024

I'm going to close this out -- there really shouldn't be any difference between top of tree and this fix. If someone is able to show something statistically significant we can reopen and revisit.

@Byte-Lab Byte-Lab closed this Jun 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants