--- researchv9/sys/h/share.h 2018/04/24 17:21:59 1.1 +++ researchv9/sys/h/share.h 2018/04/24 17:30:02 1.1.1.2 @@ -10,18 +10,18 @@ struct sh_consts u_short sc_delta; /* Run rate for scheduler in secs. */ u_short sc_maxusers; /* Max. number of active users */ u_short sc_maxgroups; /* Max. group nesting */ - u_long sc_sparep0; /* */ + float sc_ratedecay; /* Decay rate for ``kl_rate'' */ float sc_maxpri; /* Max. absolute priority */ float sc_maxupri; /* Max. priority for a normal process */ float sc_maxusage; /* Max. usage considered */ - float sc_decay; /* Decay factor for ``l_usage'' */ + float sc_decay; /* Decay rate for ``l_usage'' */ u_long sc_pridecbase; /* Base for decay for ``p_sharepri'' */ u_long sc_syscall; /* Cost of system call */ u_long sc_bio; /* " " logical block i/o */ u_long sc_tio; /* " " stream i/o */ u_long sc_tick; /* " " cpu tick */ u_long sc_click; /* " " memory tick */ - float sc_pridecay; /* Decay rate for maximally niced processes */ + float sc_pridecay; /* Decay rate for max nice ``p_sharepri'' */ float sc_maxushare; /* Factor for max effective user share */ float sc_mingshare; /* Factor for min effective group share */ u_long sc_sparep[1]; /* */ @@ -44,6 +44,7 @@ struct sh_consts extern struct sh_consts shconsts; +#define DecayRate shconsts.sc_ratedecay #define DecayUsage shconsts.sc_decay #define Delta shconsts.sc_delta #define Groups shconsts.sc_groups @@ -92,10 +93,16 @@ extern struct sh_consts shconsts; extern long NiceTicks[]; /* -** Table for pre-calculated priority decays +** Table for pre-calculated priority decays. */ extern float NiceDecays[]; + +/* +** Table for pre-calculated rate increments. +*/ + +extern float NiceRates[]; #endif KERNEL #define _SHARE_ 1