diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2002-11-21 09:14:13 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2002-11-21 09:14:13 +0000 |
| commit | 06439a04a1475d8be9923fc0ddfb1cdb0c22ed12 (patch) | |
| tree | d2494bfa3785e97d3bab130fbe3886ccb96e7a81 /sys | |
| parent | 148302c9c9fdf0aa695141a835d4f54e871c6573 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/sched_4bsd.c | 10 | ||||
| -rw-r--r-- | sys/sys/proc.h | 12 |
2 files changed, 10 insertions, 12 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 06ea6388131e..04ed3f3e6717 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -51,6 +51,16 @@ #include <sys/sysctl.h> #include <sys/sx.h> +/* + * INVERSE_ESTCPU_WEIGHT is only suitable for statclock() frequencies in + * the range 100-256 Hz (approximately). + */ +#define ESTCPULIM(e) \ + min((e), INVERSE_ESTCPU_WEIGHT * (NICE_WEIGHT * (PRIO_MAX - PRIO_MIN) - \ + RQ_PPQ) + INVERSE_ESTCPU_WEIGHT - 1) +#define INVERSE_ESTCPU_WEIGHT 8 /* 1 / (priorities per estcpu level). */ +#define NICE_WEIGHT 1 /* Priorities per nice level. */ + struct ke_sched *kse0_sched = NULL; struct kg_sched *ksegrp0_sched = NULL; struct p_sched *proc0_sched = NULL; diff --git a/sys/sys/proc.h b/sys/sys/proc.h index c0225cc460eb..c04458ec7444 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -844,18 +844,6 @@ extern struct uma_zone *proc_zone; extern int lastpid; -/* - * XXX macros for scheduler. Shouldn't be here, but currently needed for - * bounding the dubious p_estcpu inheritance in wait1(). - * INVERSE_ESTCPU_WEIGHT is only suitable for statclock() frequencies in - * the range 100-256 Hz (approximately). - */ -#define ESTCPULIM(e) \ - min((e), INVERSE_ESTCPU_WEIGHT * (NICE_WEIGHT * (PRIO_MAX - PRIO_MIN) - \ - RQ_PPQ) + INVERSE_ESTCPU_WEIGHT - 1) -#define INVERSE_ESTCPU_WEIGHT 8 /* 1 / (priorities per estcpu level). */ -#define NICE_WEIGHT 1 /* Priorities per nice level. */ - struct proc *pfind(pid_t); /* Find process by id. */ struct pgrp *pgfind(pid_t); /* Find process group by id. */ struct proc *zpfind(pid_t); /* Find zombie process by id. */ |
