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

numa: fix cpu topology conversion for non linux systems #18843

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

shoenig
Copy link
Member

@shoenig shoenig commented Oct 24, 2023

The linux path is unchanged (just moved into _linux file). The non-linux path now no longer references dead / unusable fields on non-linux systems.

E.g. is meaningless outside of Linux.

cores := n.Processors.Topology.UsableCores().Slice()
n.Cpu.ReservableCpuCores = helper.ConvertSlice(cores, func(coreID hw.CoreID) uint16 {
	return uint16(coreID)
})

Also fixes the use of "power" where we meant "performance" in reference to M1/M2 P-Cores in the attributes.

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM!

Thanks for the pointers on the file moves... it makes it easier to review side-by-side 😀

@shoenig shoenig merged commit 951cde4 into main Oct 24, 2023
25 checks passed
@shoenig shoenig deleted the darwin-cpu-resource branch October 24, 2023 14:12
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