--- researchv9/sys/h/lnode.h 2018/04/24 17:21:59 1.1 +++ researchv9/sys/h/lnode.h 2018/04/24 17:29:49 1.1.1.2 @@ -1,5 +1,5 @@ /* -** Structure for active limits. +** Structure for active shares. ** ** Used by the kernel and by programs such as "init" and "login". */ @@ -23,12 +23,11 @@ struct lnode #define ACTIVELNODE 001 /* this lnode is on active list */ #define LASTREF 002 /* set for L_DEADLIM if last reference to this lnode */ #define DEADGROUP 004 /* group account is dead */ -#define GROUPUSAGE 010 /* this lnode's usage is affected by group */ #define CHNGDLIMITS 020 /* this lnode's limits have changed */ #define NOTSHARED 040 /* this lnode does not get a share of the m/c */ /* -** Kernel user limit structure. +** Kernel user share structure. */ typedef struct kern_lnode * KL_p; @@ -40,34 +39,36 @@ struct kern_lnode KL_p kl_parent; /* group parent */ KL_p kl_gnext; /* next in parent's group */ KL_p kl_ghead; /* start of this group */ - struct lnode kl; /* the limits */ - float kl_norms; /* normalised shares for this lnode */ - float kl_eshare; /* effective share for this group */ + struct lnode kl; /* user parameters */ float kl_gshares; /* total shares for this group */ + float kl_eshare; /* effective share for this group */ + float kl_norms; /* share**2 for this lnode */ + float kl_usage; /* kl.l_usage / kl_norms */ + float kl_rate; /* active process rate for this lnode */ float kl_temp; /* temporary for scheduler */ + float kl_spare; /* */ u_long kl_cost; /* cost accumulating in current period */ - float kl_rate; /* run rate for this lnode */ + u_long kl_muse; /* memory pages used */ u_short kl_refcount; /* processes attached to this lnode */ u_short kl_children; /* lnodes attached to this lnode */ - u_long kl_muse; /* actual number of pages used */ }; /* ** Limits system call defines. */ -#define L_MYLIM 0 /* get own limits structure */ -#define L_OTHLIM 1 /* get other user's limits structure */ -#define L_ALLLIM 2 /* get all active limits structures */ -#define L_SETLIM 3 /* set limits */ -#define L_DEADLIM 4 /* get zombie and limits structure of child */ -#define L_CHNGLIM 5 /* change active lnode (limits only) */ -#define L_DEADGROUP 6 /* get limits structure for dead group */ +#define L_MYLIM 0 /* get own lnode structure */ +#define L_OTHLIM 1 /* get other user's lnode structure */ +#define L_ALLLIM 2 /* get all active lnode structures */ +#define L_SETLIM 3 /* set lnode for new user */ +#define L_DEADLIM 4 /* get zombie and lnode structure of child */ +#define L_CHNGLIM 5 /* change active lnode parameters */ +#define L_DEADGROUP 6 /* get lnode structure for dead group */ #define L_GETCOSTS 7 /* get share constants */ #define L_SETCOSTS 8 /* set share constants */ -#define L_MYKN 9 /* get own kernel lnode structure */ -#define L_OTHKN 10 /* get other user's kernel lnode structure */ -#define L_ALLKN 11 /* get all active kernel lnode structures */ +#define L_MYKN 9 /* get own kern_lnode structure */ +#define L_OTHKN 10 /* get other user's kern_lnode structure */ +#define L_ALLKN 11 /* get all active kern_lnode structures */ /* ** Kernel lnode table.