p_cpu exists, but p_usrpri isn't based on it. Index: sys/sys/proc.h =================================================================== RCS file: /cvs/src/sys/sys/proc.h,v retrieving revision 1.216 diff -u -p -r1.216 proc.h --- sys/sys/proc.h 6 Mar 2016 05:20:26 -0000 1.216 +++ sys/sys/proc.h 8 Mar 2016 08:52:58 -0000 @@ -323,7 +323,7 @@ struct proc { sigset_t p_sigmask; /* Current signal mask. */ u_char p_priority; /* Process priority. */ - u_char p_usrpri; /* User-priority based on p_cpu and ps_nice. */ + u_char p_usrpri; /* User-priority based on p_estcpu and ps_nice. */ char p_comm[MAXCOMLEN+1]; int p_pledge_syscall; /* Cache of current syscall */ Index: sys/sys/sysctl.h =================================================================== RCS file: /cvs/src/sys/sys/sysctl.h,v retrieving revision 1.158 diff -u -p -r1.158 sysctl.h --- sys/sys/sysctl.h 29 Feb 2016 19:44:07 -0000 1.158 +++ sys/sys/sysctl.h 8 Mar 2016 08:52:58 -0000 @@ -377,7 +377,7 @@ struct kinfo_proc { int8_t p_stat; /* CHAR: S* process status (from LWP). */ u_int8_t p_priority; /* U_CHAR: Process priority. */ - u_int8_t p_usrpri; /* U_CHAR: User-priority based on p_cpu and ps_nice. */ + u_int8_t p_usrpri; /* U_CHAR: User-priority based on p_estcpu and ps_nice. */ u_int8_t p_nice; /* U_CHAR: Process "nice" value. */ u_int16_t p_xstat; /* U_SHORT: Exit status for wait; also stop signal. */
-- Michal Mazurek