lkml.org 
[lkml]   [2004]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [PATCH][2.6] fix i386 idle routine selection
Date
From


The original idea of setting it back to default_idle(),
was to handle the cases:
1) CPU 0 says it can do mwait and CPU 1 later says it
cannot do mwait
2) CPU 0 says it cannot do mwait and later CPU 1 says
that it can do mwait

Not that I know of any system like that. But, ideally
mwait_idle should be set only when all CPUs say that
they can do it.

So how about this patch.

Thanks,
Venki


>-----Original Message-----
>From: robomod@news.nic.it [mailto:robomod@news.nic.it] On
>Behalf Of Zwane Mwaikambo
>Sent: Sunday, August 08, 2004 11:20 AM
>Subject: [PATCH][2.6] fix i386 idle routine selection
>
>This was broken when the mwait stuff went in since it executes
>after the
>initial idle_setup() has already selected an idle routine and
>overrides it
>with default_idle.
>
>Signed-off-by: Zwane Mwaikambo <zwane@fsmlabs.com>
>
>Index: linux-2.6.8-rc3-mm1-amd64/arch/i386/kernel/process.c
>===================================================================
>RCS file:
>/home/cvsroot/linux-2.6.8-rc3-mm1/arch/i386/kernel/process.c,v
>retrieving revision 1.1.1.1
>diff -u -p -B -r1.1.1.1 process.c
>--- linux-2.6.8-rc3-mm1-amd64/arch/i386/kernel/process.c
>5 Aug 2004 16:37:39 -0000 1.1.1.1
>+++ linux-2.6.8-rc3-mm1-amd64/arch/i386/kernel/process.c
>8 Aug 2004 18:14:32 -0000
>@@ -226,10 +226,7 @@ void __init select_idle_routine(const st
> printk("using mwait in idle threads.\n");
> pm_idle = mwait_idle;
> }
>- return;
> }
>- pm_idle = default_idle;
>- return;
> }
>
> static int __init idle_setup (char *str)
>Index: linux-2.6.8-rc3-mm1-amd64/arch/x86_64/kernel/process.c
>===================================================================
>RCS file:
>/home/cvsroot/linux-2.6.8-rc3-mm1/arch/x86_64/kernel/process.c,v
>retrieving revision 1.1.1.1
>diff -u -p -B -r1.1.1.1 process.c
>--- linux-2.6.8-rc3-mm1-amd64/arch/x86_64/kernel/process.c
>5 Aug 2004 16:37:48 -0000 1.1.1.1
>+++ linux-2.6.8-rc3-mm1-amd64/arch/x86_64/kernel/process.c
>8 Aug 2004 18:12:22 -0000
>@@ -180,10 +180,7 @@ void __init select_idle_routine(const st
> }
> pm_idle = mwait_idle;
> }
>- return;
> }
>- pm_idle = default_idle;
>- return;
> }
>
> static int __init idle_setup (char *str)
>-
>To unsubscribe from this list: send the line "unsubscribe
>linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.036 / U:6.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site