diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-01-30 08:51:28 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-01-30 08:51:28 +0000 |
commit | 96ee2a5e760d7ceead850ce405dafe725eef12be (patch) | |
tree | eb01d054c7b24653631e51c9d0f072cced13c983 /sys/kern/kern_proc.c | |
parent | ed89ebd6ca2e1f64a4a94830103b0aee51ed140b (diff) |
Split `p_priority' into `p_runpri' and `p_slppri'.
Using different fields to remember in which runqueue or sleepqueue
threads currently are will make it easier to split the SCHED_LOCK().
With this change, the (potentially boosted) sleeping priority is no
longer overwriting the thread priority. This let us get rids of the
logic required to synchronize `p_priority' with `p_usrpri'.
Tested by many, ok visa@
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 934cf455ba1..8ef2a143949 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_proc.c,v 1.85 2018/11/12 15:09:17 visa Exp $ */ +/* $OpenBSD: kern_proc.c,v 1.86 2020/01/30 08:51:27 mpi Exp $ */ /* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */ /* @@ -476,7 +476,7 @@ proc_printit(struct proc *p, const char *modif, (*pr)(" flags process=%b proc=%b\n", p->p_p->ps_flags, PS_BITS, p->p_flag, P_BITS); (*pr)(" pri=%u, usrpri=%u, nice=%d\n", - p->p_priority, p->p_usrpri, p->p_p->ps_nice); + p->p_runpri, p->p_usrpri, p->p_p->ps_nice); (*pr)(" forw=%p, list=%p,%p\n", TAILQ_NEXT(p, p_runq), p->p_list.le_next, p->p_list.le_prev); (*pr)(" process=%p user=%p, vmspace=%p\n", |