summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2008-04-17 04:20:10 +0000
committerjeff <jeff@FreeBSD.org>2008-04-17 04:20:10 +0000
commit9d30d1d7a4245f9915c17e74f97d6909fb40ada9 (patch)
tree670d4df2ed30d93745545294f2c7cb18db2f3d2c /sys/vm
parenta61cdf99c2c0d01312b2493fb6f7b245ba4f0ba9 (diff)
downloadFreeBSD-src-9d30d1d7a4245f9915c17e74f97d6909fb40ada9.zip
FreeBSD-src-9d30d1d7a4245f9915c17e74f97d6909fb40ada9.tar.gz
- Make SCHED_STATS more generic by adding a wrapper to create the
variables and sysctl nodes. - In reset walk the children of kern_sched_stats and reset the counters via the oid_arg1 pointer. This allows us to add arbitrary counters to the tree and still reset them properly. - Define a set of switch types to be passed with flags to mi_switch(). These types are named SWT_*. These types correspond to SCHED_STATS counters and are automatically handled in this way. - Make the new SWT_ types more specific than the older switch stats. There are now stats for idle switches, remote idle wakeups, remote preemption ithreads idling, etc. - Add switch statistics for ULE's pickcpu algorithm. These stats include how much migration there is, how often affinity was successful, how often threads were migrated to the local cpu on wakeup, etc. Sponsored by: Nokia
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_glue.c2
-rw-r--r--sys/vm/vm_zeroidle.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index 9f9dc5a..462c460 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -735,7 +735,7 @@ loop:
thread_lock(&thread0);
if (!proc0_rescan) {
TD_SET_IWAIT(&thread0);
- mi_switch(SW_VOL, NULL);
+ mi_switch(SW_VOL | SWT_IWAIT, NULL);
}
proc0_rescan = 0;
thread_unlock(&thread0);
diff --git a/sys/vm/vm_zeroidle.c b/sys/vm/vm_zeroidle.c
index c82de5a..9e1970a 100644
--- a/sys/vm/vm_zeroidle.c
+++ b/sys/vm/vm_zeroidle.c
@@ -127,7 +127,7 @@ vm_pagezero(void __unused *arg)
#ifndef PREEMPTION
if (sched_runnable()) {
thread_lock(curthread);
- mi_switch(SW_VOL, NULL);
+ mi_switch(SW_VOL | SWT_IDLE, NULL);
thread_unlock(curthread);
}
#endif
OpenPOWER on IntegriCloud