2002-07-28 20:47:50

by Oleg Nesterov

[permalink] [raw]
Subject: Re: [announce, patch] Thread-Local Storage (TLS) support for Linux,2.5.28

Hello.

Ingo Molnar wrote:
>
> On Sun, 28 Jul 2002, Oleg Nesterov wrote:
>
> > + * 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
>
> actually, shouldnt this be done after saving the current %fs and %gs, and
> before loading the next %fs and %gs?
>
> Ingo

Well, load_TLS() and saving current %fs,%gs are just mem stores, no?
I can't see any difference in terms of correctness.

Oleg.


2002-07-28 20:49:19

by Ingo Molnar

[permalink] [raw]
Subject: Re: [announce, patch] Thread-Local Storage (TLS) support for Linux,2.5.28


On Mon, 29 Jul 2002, Oleg Nesterov wrote:

> Well, load_TLS() and saving current %fs,%gs are just mem stores, no? I
> can't see any difference in terms of correctness.

yes, your patch is fine.

Ingo