diff options
author | jeff <jeff@FreeBSD.org> | 2004-01-25 03:54:52 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2004-01-25 03:54:52 +0000 |
commit | c85cdc3d0fd697f504c2f05524ded0b3282c75bf (patch) | |
tree | 5db1ead5d1c75b7e2ece1d370fa6708964bf49f8 /sys/vm | |
parent | ca8a19313e2f06d57456af75aaa70204aa2efede (diff) | |
download | FreeBSD-src-c85cdc3d0fd697f504c2f05524ded0b3282c75bf.zip FreeBSD-src-c85cdc3d0fd697f504c2f05524ded0b3282c75bf.tar.gz |
- Add a flags parameter to mi_switch. The value of flags may be SW_VOL or
SW_INVOL. Assert that one of these is set in mi_switch() and propery
adjust the rusage statistics. This is to simplify the large number of
users of this interface which were previously all required to adjust the
proper counter prior to calling mi_switch(). This also facilitates more
switch and locking optimizations.
- Change all callers of mi_switch() to pass the appropriate paramter and
remove direct references to the process statistics.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_zeroidle.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/vm/vm_zeroidle.c b/sys/vm/vm_zeroidle.c index 9dc0419..863804a 100644 --- a/sys/vm/vm_zeroidle.c +++ b/sys/vm/vm_zeroidle.c @@ -155,8 +155,7 @@ vm_pagezero(void) pages += vm_page_zero_idle(); if (pages > idlezero_maxrun || sched_runnable()) { mtx_lock_spin(&sched_lock); - td->td_proc->p_stats->p_ru.ru_nvcsw++; - mi_switch(); + mi_switch(SW_VOL); mtx_unlock_spin(&sched_lock); pages = 0; } |