diff options
author | peter <peter@FreeBSD.org> | 2002-07-19 21:06:01 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-07-19 21:06:01 +0000 |
commit | febe98ab987ed825ad33e6021d93952ba1a00eb5 (patch) | |
tree | 64c0bb823f585b24137a6d7d841d7864c4f74c27 | |
parent | 1926ab155f1c8b9139f44c6dee9e11137e730405 (diff) | |
download | FreeBSD-src-febe98ab987ed825ad33e6021d93952ba1a00eb5.zip FreeBSD-src-febe98ab987ed825ad33e6021d93952ba1a00eb5.tar.gz |
Set P_NOLOAD on the pagezero kthread so that it doesn't artificially skew
the loadav. This is not real load. If you have a nice process running in
the background, pagezero may sit in the run queue for ages and add one to
the loadav, and thereby affecting other scheduling decisions.
-rw-r--r-- | sys/vm/vm_zeroidle.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/vm/vm_zeroidle.c b/sys/vm/vm_zeroidle.c index 46db4e7..a239cfa 100644 --- a/sys/vm/vm_zeroidle.c +++ b/sys/vm/vm_zeroidle.c @@ -107,17 +107,23 @@ vm_page_zero_idle_wakeup(void) static void vm_pagezero(void) { - struct thread *td = curthread; + struct thread *td; + struct proc *p; struct rtprio rtp; int pages = 0; int pri; + td = curthread; + p = td->td_proc; rtp.prio = RTP_PRIO_MAX; rtp.type = RTP_PRIO_IDLE; mtx_lock_spin(&sched_lock); rtp_to_pri(&rtp, td->td_ksegrp); pri = td->td_priority; mtx_unlock_spin(&sched_lock); + PROC_LOCK(p); + p->p_flag |= P_NOLOAD; + PROC_UNLOCK(p); for (;;) { if (vm_page_zero_check()) { |