diff options
author | julian <julian@FreeBSD.org> | 2002-02-11 20:37:54 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-02-11 20:37:54 +0000 |
commit | 37369620df3d22440dcb4976ad061fe320a01bcb (patch) | |
tree | 91fc1230622927515e2c60360059682b64d84592 /sys/vm | |
parent | 72a803ac5ecbbbc7caf38fab112121c93f703b3f (diff) | |
download | FreeBSD-src-37369620df3d22440dcb4976ad061fe320a01bcb.zip FreeBSD-src-37369620df3d22440dcb4976ad061fe320a01bcb.tar.gz |
In a threaded world, differnt priorirites become properties of
different entities. Make it so.
Reviewed by: jhb@freebsd.org (john baldwin)
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_glue.c | 5 | ||||
-rw-r--r-- | sys/vm/vm_meter.c | 3 | ||||
-rw-r--r-- | sys/vm/vm_zeroidle.c | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index ce4a800..6559258 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -485,6 +485,7 @@ int action; { struct proc *p; struct ksegrp *kg; + struct thread *td; struct proc *outp, *outp2; int outpri, outpri2; int didswap = 0; @@ -531,7 +532,7 @@ retry: * Check all the thread groups.. */ FOREACH_KSEGRP_IN_PROC(p, kg) { - if (PRI_IS_REALTIME(kg->kg_pri.pri_class)) { + if (PRI_IS_REALTIME(kg->kg_pri_class)) { mtx_unlock_spin(&sched_lock); PROC_UNLOCK(p); goto nextproc; @@ -543,7 +544,7 @@ retry: * Also guarantee swap_idle_threshold1 * time in memory. */ - if (((kg->kg_pri.pri_level) < PSOCK) || + if (((FIRST_THREAD_IN_PROC(p)->td_priority) < PSOCK) || (kg->kg_slptime < swap_idle_threshold1)) { mtx_unlock_spin(&sched_lock); PROC_UNLOCK(p); diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index 23ad97b..51f8107 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -114,7 +114,8 @@ vmtotal(SYSCTL_HANDLER_ARGS) case SSTOP: kg = &p->p_ksegrp; /* XXXKSE */ if (p->p_sflag & PS_INMEM) { - if (kg->kg_pri.pri_level <= PZERO) + if (FIRST_THREAD_IN_PROC(p)->td_priority + <= PZERO) totalp->t_dw++; else if (kg->kg_slptime < maxslp) totalp->t_sl++; diff --git a/sys/vm/vm_zeroidle.c b/sys/vm/vm_zeroidle.c index a7e5685..92e5f27 100644 --- a/sys/vm/vm_zeroidle.c +++ b/sys/vm/vm_zeroidle.c @@ -119,7 +119,7 @@ vm_pagezero(void) rtp.prio = RTP_PRIO_MAX; rtp.type = RTP_PRIO_IDLE; mtx_lock_spin(&sched_lock); - rtp_to_pri(&rtp, &td->td_ksegrp->kg_pri); + rtp_to_pri(&rtp, td->td_ksegrp); mtx_unlock_spin(&sched_lock); for (;;) { |