On Thu, Mar 12, 2015 at 08:42:31AM +0100, Theo Buehler wrote: > I am confused by the new documentation of HW_PERFPOLICY. Is this bound > to change? Looking at the function sysctl_hwperfpolicy() in > sys/kern/sched_bsd.c, I think the following is more accurate, although I > don't know what has to go wrong that the string is actually set to > `unknown'. > > For consistency with the rest of the manual page, I used .Dq instead > of .Qq. > > $ apm -L > $ sysctl hw.perfpolicy > hw.perfpolicy=manual > $ apm -A > $ sysctl hw.perfpolicy > hw.perfpolicy=auto > $ apm -H > $ sysctl hw.perfpolicy > hw.perfpolicy=high > >
i couldn;t actually work out how to extract the possible values, so i asked tedu. in his defense, he didn;t say my diff was correct - only that it was "good enough". perhaps his own perfpolicy was set to "high" ;) i think the "unknown" will be a catchall for errors, and we shouldn;t suggest to users that they can set it. so my suggestion is below. i'll commit later if no one has yelled too much. jmc Index: sysctl.3 =================================================================== RCS file: /cvs/src/lib/libc/gen/sysctl.3,v retrieving revision 1.248 diff -u -r1.248 sysctl.3 --- sysctl.3 11 Mar 2015 19:42:38 -0000 1.248 +++ sysctl.3 12 Mar 2015 08:20:10 -0000 @@ -332,9 +332,10 @@ .It Dv HW_PERFPOLICY The performance policy for power management. Can be one of -.Qq manual +.Dq manual , +.Dq automatic , or -.Qq automatic . +.Dq high . .It Dv HW_PHYSMEM The total physical memory, in bytes. This variable is deprecated; use @@ -377,6 +378,10 @@ .It Dv HW_SETPERF Current CPU performance .Pq percentage . +It is only modifiable if +.Dv HW_PERFPOLICY +is set to +.Dq manual . .It Dv HW_USERMEM The amount of available non-kernel memory in bytes. This variable is deprecated; use
