mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [announce, patch] Thread-Local Storage (TLS) support for Linux,  2.5.28
Date: Sun, 28 Jul 2002 22:44:28 +0400	[thread overview]
Message-ID: <3D443B8C.7C2028B0@tv-sign.ru> (raw)

Hello.

I thought, that gdt entry consulted only while
loading its index into the segment register.

So load_TLS_desc(next, cpu) must be called before
loading next->fs,next->gs in __switch_to() ?

--- linux-2.5.29/arch/i386/kernel/process.c~	Sun Jul 28 21:44:35 2002
+++ linux-2.5.29/arch/i386/kernel/process.c	Sun Jul 28 21:46:07 2002
@@ -675,6 +675,14 @@
 	tss->esp0 = next->esp0;
 
 	/*
+	 * Load the per-thread Thread-Local Storage descriptor.
+	 *
+	 * NOTE: it's faster to do the two stores unconditionally
+	 * than to branch away.
+	 */
+	load_TLS_desc(next, cpu);
+
+	/*
 	 * Save away %fs and %gs. No need to save %es and %ds, as
 	 * those are always kernel segments while inside the kernel.
 	 */
@@ -688,14 +696,6 @@
 		loadsegment(fs, next->fs);
 		loadsegment(gs, next->gs);
 	}
-
-	/*
-	 * Load the per-thread Thread-Local Storage descriptor.
-	 *
-	 * NOTE: it's faster to do the two stores unconditionally
-	 * than to branch away.
-	 */
-	load_TLS_desc(next, cpu);
 
 	/*
 	 * Now maybe reload the debug registers

Oleg.

             reply	other threads:[~2002-07-28 18:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-28 18:44 Oleg Nesterov [this message]
2002-07-28 20:01 ` Ingo Molnar
2002-07-28 20:14   ` Ingo Molnar
2002-07-28 20:19   ` [announce, patch] Thread-Local Storage (TLS) support for Linux,2.5.28 Oleg Nesterov
2002-07-28 20:08 ` [announce, patch] Thread-Local Storage (TLS) support for Linux, 2.5.28 Ingo Molnar
2002-07-28 20:54   ` [announce, patch] Thread-Local Storage (TLS) support for Linux,2.5.28 Oleg Nesterov
2002-07-28 20:51     ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2002-07-25 17:35 [announce, patch] Thread-Local Storage (TLS) support for Linux, 2.5.28 Ingo Molnar
2002-07-26 13:06 ` jlnance

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=3D443B8C.7C2028B0@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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®