From 14b586bf964970197e12228d127a713b7db7abcb Mon Sep 17 00:00:00 2001 From: jeff Date: Fri, 25 Apr 2008 05:18:50 +0000 Subject: - Add an integer argument to idle to indicate how likely we are to wake from idle over the next tick. - Add a new MD routine, cpu_wake_idle() to wakeup idle threads who are suspended in cpu specific states. This function can fail and cause the scheduler to fall back to another mechanism (ipi). - Implement support for mwait in cpu_idle() on i386/amd64 machines that support it. mwait is a higher performance way to synchronize cpus as compared to hlt & ipis. - Allow selecting the idle routine by name via sysctl machdep.idle. This replaces machdep.cpu_idle_hlt. Only idle routines supported by the current machine are permitted. Sponsored by: Nokia --- sys/ia64/ia64/machdep.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sys/ia64') diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 45e57de..d6ed3c3 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -335,7 +335,7 @@ cpu_halt() } static void -cpu_idle_default(void) +cpu_idle_default(int busy) { struct ia64_pal_result res; @@ -348,6 +348,13 @@ cpu_idle() (*cpu_idle_hook)(); } +int +cpu_idle_wakeup(int cpu) +{ + + return (0); +} + /* Other subsystems (e.g., ACPI) can hook this later. */ void (*cpu_idle_hook)(void) = cpu_idle_default; -- cgit v1.1