Skip to content

x/build/env/openbsd: set sysctl hw.smt=1 #28403

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

Closed
bradfitz opened this issue Oct 26, 2018 · 4 comments
Closed

x/build/env/openbsd: set sysctl hw.smt=1 #28403

bradfitz opened this issue Oct 26, 2018 · 4 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-OpenBSD Performance
Milestone

Comments

@bradfitz
Copy link
Contributor

The OpenBSD images should disable Spectre/Meltdown protections and set sysctl hw.smt=1 per

https://go-review.googlesource.com/c/build/+/144777#message-b10c10646c34b670194db8c9d72ac8a551d3ab80

@bradfitz bradfitz added Performance OS-OpenBSD NeedsFix The path to resolution is known, but the work has not been done. labels Oct 26, 2018
@gopherbot gopherbot added this to the Unreleased milestone Oct 26, 2018
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Oct 26, 2018
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/144777 mentions this issue: dashboard: switch OpenBSD trybot from 6.2 to 6.4

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/145022 mentions this issue: env/openbsd-amd64: enable SMT on OpenBSD 6.4

@bradfitz
Copy link
Contributor Author

Actually, turns out we can do this at runtime from the buildlet:

buildlet# sysctl hw.smt=1; sysctl hw.ncpuonline 
hw.smt: 1 -> 1
hw.ncpuonline=4

buildlet# sysctl hw.smt=0; sysctl hw.ncpuonline 
hw.smt: 1 -> 0
hw.ncpuonline=2

@dmitshur
Copy link
Member

dmitshur commented Oct 26, 2018

For reference, I tried sysctl hw.ncpuonline on a openbsd-386-64 builder, and it reported hw.ncpuonline=4 despite not having hw.smt (compared to amd64 builder which reports hw.ncpuonline=2 until you set hw.smt=1).

I understand that to mean that SMT is not disabled on 32-bit OpenBSD.

@golang golang locked and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-OpenBSD Performance
Projects
None yet
Development

No branches or pull requests

3 participants