> HOWEVER. That is actually not the right (well, "complete") conditional,
> since it's only one sub-case of the thing that matters. The right
> conditional is probably
>
> /*
> * Restore %gs if needed (which is common).
> * We can avoid it if they are identical, and
> * point to the GDT.
How would you catch (common) the case of them having different bases in the
GDT TLS entries? At some point the selector has to be reloaded, otherwise
it won't be picked up by the CPU.
I think the original condition is correct. You could maybe merge it with the
TLS entry rewrite and only do it if something changes there. Not
sure it is worth it though.
-Andi
> */
> if ((prev->gs ^ next->gs) | (next->gs & 4))
> loadsegment(gs, next->gs);
>
> At that point, we would only have to reload stuff if the user actually
> uses a local descriptor table entry (which does happen for threaded apps,
> I guess, but at least we avoid it for all the common traditional UNIX
> processes).
>
> Linus
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]