lkml.org 
[lkml]   [2002]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] [sched] x86 idle thread should clear %fs, %gs
Hi!

> so it appears that this lowlevel x86 performance bug(?) is more than 11
> years old! :-)

Probably 386's were not optimized for %fs==%gs==0 case?

BTW does it really make a difference for the CPU?
Pavel

> @@ -2803,9 +2803,10 @@
> load_TR(nr);
> load_LDT(&init_mm);
>
> - /*
> - * Clear all 6 debug registers:
> - */
> + /* Clear %fs and %gs. */
> + asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
> +
> + /* Clear all 6 debug registers: */
>
> #define CD(register) __asm__("movl %0,%%db" #register ::"r"(0) );

--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.771 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site