Download raw body.
sys/sysctl: make hw.setperf MP safe
On 2025-05-21, Kirill A. Korinsky wrote: > tech@, > > Here a diff which makes hw.setperf MP safe. Am I out of the loop? What machine doesn't load an int atomically? > - perflevel = 100; > - cpu_setperf(perflevel); > + atomic_store_int(&perflevel, 100); > + cpu_setperf(atomic_load_int(&perflevel)); Constructs like this in particular look weird. If there's a race, this doesn't fix it.
sys/sysctl: make hw.setperf MP safe