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

topology: support single CPU systems #188

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Conversation

arighi
Copy link
Collaborator

@arighi arighi commented Mar 14, 2024

We are failing to parse /sys/devices/system/cpu/online in systems with just one CPU, for example:

$ vng -r --cpus 1 -- scx_rusty
Error: Failed to parse online cpus 0

Correctly handle strings containing only a single CPU during parsing.

Fixes: c5a3b83 ("topology: Add new topology crate")

We are failing to parse /sys/devices/system/cpu/online in systems with
just one CPU, for example:

 $ vng -r --cpus 1 -- scx_rusty
 Error: Failed to parse online cpus 0

Correctly handle strings containing only a single CPU during parsing.

Fixes: c5a3b83 ("topology: Add new topology crate")
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Copy link
Contributor

@Byte-Lab Byte-Lab left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

bail!("Failed to parse online cpus {}", group.trim());
}
}
},
};
for i in min..max {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'll also need 583696f right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just pushed so should be able to just rebase

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we'll also need 583696f right?

Indeed, thanks for the extra fix! :)

@Byte-Lab Byte-Lab merged commit 3ad0fff into main Mar 14, 2024
1 check passed
@Byte-Lab Byte-Lab deleted the topology-fix-single-cpu branch March 14, 2024 18:19
@Byte-Lab Byte-Lab restored the topology-fix-single-cpu branch March 14, 2024 18:19
@Byte-Lab Byte-Lab deleted the topology-fix-single-cpu branch March 14, 2024 18:20
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.

None yet

2 participants