lkml.org 
[lkml]   [2002]   [Jan]   [30]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 29 Jan 2002 01:04:20 +0100
FromPavel Machek <>
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 12:15    [from the cache]
©2003-2008