Project

General

Profile

Bug #19 ยป usched-misc.diff

belczyk, 12/21/2005 06:41 PM

View differences:

bin/ps/keyword.c 20 Dec 2005 19:02:34 -0000
{"re", "RE", NULL, 0, pvar, NULL, 3, POFF(p_swtime), UINT, "d", NULL},
{"rgid", "RGID", NULL, 0, evar, NULL, UIDLEN, EOFF(e_ucred.cr_rgid),
UINT, UIDFMT, NULL},
{"rlink", "RLINK", NULL, 0, pvar, NULL, 8, POFF(p_lwp.lwp_procq.tqe_prev), KPTR, "lx",
NULL},
{"rss", "RSS", NULL, 0, p_rssize, NULL, 4, 0, 0, NULL, NULL},
{"rssize", "", "rsz", 0, NULL, NULL, 0, 0, 0, NULL, NULL},
{"rsz", "RSZ", NULL, 0, rssize, NULL, 4, 0, 0, NULL, NULL},
bin/ps/ps.1 20 Dec 2005 19:03:29 -0000
.It rgid
real group
.Tn ID
.It rlink
reverse link on run queue, or 0
.It rss
resident set size
.It rsz
sys/kern/kern_usched.c 20 Dec 2005 19:42:18 -0000
if (item && item != p->p_usched) {
p->p_usched->release_curproc(&p->p_lwp);
p->p_usched = item;
/*
* Give the new usched a chance to recognize the lwp
* as a 'new' one.
*/
bzero(&p->p_lwp.lwp_usdata, sizeof(p->p_lwp.lwp_usdata));
} else if (item == NULL) {
error = EINVAL;
}
sys/kern/usched_bsd4.c 20 Dec 2005 18:59:29 -0000
#define lwp_rqindex lwp_usdata.bsd4.rqindex
#define lwp_origcpu lwp_usdata.bsd4.origcpu
#define lwp_estcpu lwp_usdata.bsd4.estcpu
#define lwp_procq lwp_usdata.bsd4.lwp_procq
static void bsd4_acquire_curproc(struct lwp *lp);
static void bsd4_release_curproc(struct lwp *lp);
sys/sys/proc.h 20 Dec 2005 18:58:21 -0000
struct jail;
struct lwp {
TAILQ_ENTRY(lwp) lwp_procq; /* run/sleep queue. */
LIST_ENTRY(lwp) lwp_list; /* List of all threads in the proc. */
struct proc *lwp_proc; /* Link to our proc. */
sys/sys/usched.h 20 Dec 2005 18:58:18 -0000
* BSD4 scheduler.
*/
struct {
TAILQ_ENTRY(lwp) lwp_procq; /* run/sleep queue. */
short priority; /* lower is better */
char interactive; /* (currently not used) */
char rqindex;
......
int estcpu; /* dynamic priority modification */
} bsd4;
int pad[4]; /* PAD for future expansion */
int pad[8]; /* PAD for future expansion */
};
/*
    (1-1/1)