diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2000-09-15 22:00:23 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2000-09-15 22:00:23 +0000 |
| commit | 7ab37af1edeae8fc0d51318e5bbcf05de561e3b6 (patch) | |
| tree | 36a5fa6aa2d002d13e6a8d592cf2dc1e4c51e03c | |
| parent | 5cd95fe8d5e214909aa007ab2c91acf01f36f58c (diff) | |
Notes
| -rw-r--r-- | sys/amd64/isa/ithread.c | 1 | ||||
| -rw-r--r-- | sys/i386/isa/ithread.c | 1 | ||||
| -rw-r--r-- | sys/kern/kern_idle.c | 1 | ||||
| -rw-r--r-- | sys/sys/proc.h | 3 | ||||
| -rw-r--r-- | sys/vm/vm_meter.c | 3 |
5 files changed, 8 insertions, 1 deletions
diff --git a/sys/amd64/isa/ithread.c b/sys/amd64/isa/ithread.c index 9e6b41e1a7963..f8326eaa2b68d 100644 --- a/sys/amd64/isa/ithread.c +++ b/sys/amd64/isa/ithread.c @@ -299,6 +299,7 @@ start_softintr(void *dummy) p->p_rtprio.type = RTP_PRIO_ITHREAD; p->p_rtprio.prio = PI_SOFT; /* soft interrupt */ p->p_stat = SWAIT; /* we're idle */ + p->p_flag |= P_NOLOAD; /* Put in linkages. */ softintr->it_proc = p; diff --git a/sys/i386/isa/ithread.c b/sys/i386/isa/ithread.c index 9e6b41e1a7963..f8326eaa2b68d 100644 --- a/sys/i386/isa/ithread.c +++ b/sys/i386/isa/ithread.c @@ -299,6 +299,7 @@ start_softintr(void *dummy) p->p_rtprio.type = RTP_PRIO_ITHREAD; p->p_rtprio.prio = PI_SOFT; /* soft interrupt */ p->p_stat = SWAIT; /* we're idle */ + p->p_flag |= P_NOLOAD; /* Put in linkages. */ softintr->it_proc = p; diff --git a/sys/kern/kern_idle.c b/sys/kern/kern_idle.c index b7d70314fb757..b6aa0c0e7dc7d 100644 --- a/sys/kern/kern_idle.c +++ b/sys/kern/kern_idle.c @@ -65,6 +65,7 @@ idle_setup(void *dummy) if (error) panic("idle_setup: kthread_create error %d\n", error); + gd->gd_idleproc->p_flag |= P_NOLOAD; gd->gd_idleproc->p_stat = SRUN; } } diff --git a/sys/sys/proc.h b/sys/sys/proc.h index edc2cd2226941..d504aba7bbeb1 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -266,7 +266,7 @@ struct proc { #define SSLEEP 3 /* Sleeping on an address. */ #define SSTOP 4 /* Process debugging or suspension. */ #define SZOMB 5 /* Awaiting collection by parent. */ -#define SWAIT 6 /* Waiting for interrupt or CPU. */ +#define SWAIT 6 /* Waiting for interrupt. */ #define SMTX 7 /* Blocked on a mutex. */ /* These flags are kept in p_flags. */ @@ -284,6 +284,7 @@ struct proc { #define P_WAITED 0x01000 /* Debugging process has waited for child. */ #define P_WEXIT 0x02000 /* Working on exiting. */ #define P_EXEC 0x04000 /* Process called exec. */ +#define P_NOLOAD 0x08000 /* Ignore during load avg calculations. */ /* Should probably be changed into a hold count. */ /* was P_NOSWAP 0x08000 was: Do not swap upages; p->p_hold */ diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index 0f584c86ae29f..8b68a65c6d7fb 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -85,6 +85,9 @@ loadav(struct loadavg *avg) continue; /* FALLTHROUGH */ case SRUN: + if ((p->p_flag & P_NOLOAD) != 0) + continue; + /* FALLTHROUGH */ case SIDL: nrun++; } |
