mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch] [sched] x86 idle thread should clear %fs, %gs
Date: Tue, 29 Jan 2002 01:04:20 +0100	[thread overview]
Message-ID: <20020129000419.GA18496@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.33.0201271826220.5785-100000@localhost.localdomain>
In-Reply-To: <Pine.LNX.4.33.0201271826220.5785-100000@localhost.localdomain>

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

  reply	other threads:[~2002-01-30 21:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-27 17:37 Ingo Molnar
2002-01-29  0:04 ` Pavel Machek [this message]
2002-01-31 11:33   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020129000419.GA18496@elf.ucw.cz \
    --to=pavel@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®