From 9d30d1d7a4245f9915c17e74f97d6909fb40ada9 Mon Sep 17 00:00:00 2001 From: jeff Date: Thu, 17 Apr 2008 04:20:10 +0000 Subject: - 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 --- sys/vm/vm_glue.c | 2 +- sys/vm/vm_zeroidle.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/vm') 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 -- cgit v1.1