Re: Help understanding slow down

From: Ingo Molnar
Date: Tue May 25 2004 - 04:23:12 EST



* Andrew Morton <akpm@xxxxxxxx> wrote:

> But if you _are_ using poll_idle() and if your CPU is hyperthreaded
> then yes, one "CPU" is going to take a performance hit from the "idle"
> one.

with the patch below we will print a big fat warning. (I did not want to
deny idle=poll altogether - future HT implementations might work fine
with polling idle.)

Ingo

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>

--- linux/arch/i386/kernel/process.c.orig
+++ linux/arch/i386/kernel/process.c
@@ -202,6 +202,10 @@ static int __init idle_setup (char *str)
if (!strncmp(str, "poll", 4)) {
printk("using polling idle threads.\n");
pm_idle = poll_idle;
+#ifdef CONFIG_SMP
+ if (smp_num_siblings > 1)
+ printk("WARNING: polling idle and HT enabled, performance may degrade.\n");
+#endif
} else if (!strncmp(str, "halt", 4)) {
printk("using halt in idle threads.\n");
pm_idle = default_idle;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/