lkml.org 
[lkml]   [2006]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i386-pda UP optimization
Ingo Molnar wrote:
> i said this before: using segmentation tricks these days is /insane/.
> Segmentation is not for free, and it's not going to be cheap in the
> future. In fact, chances are that it will be /more/ expensive in the
> future, because sane OSs just make no use of them besides the trivial
> "they dont even exist" uses.
>

Many, many systems use %fs/%gs to implement some kind of thread-local
storage, and such usage is becoming more common; the PDA's use of it in
the kernel is no different. I would agree that using all the obscure
corners of segmentation is just asking for trouble, but using %gs as an
address offset seems like something that's going to be efficient on x86
32/64 processors indefinitely.

> so /at a minimum/, as i suggested it before, the kernel's segment use
> should not overlap that of glibc's. I.e. the kernel should use %fs, not
> %gs.

Last time you raised this I did a pretty comprehensive set of tests
which showed there was flat out zero difference between using %fs and
%gs. There doesn't seem to be anything to the theory that reloading a
null segment selector is in any way cheaper than loading a real
selector. Did you find a problem in my methodology?

J
-
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: 2006-11-15 19:03    [W:0.112 / U:0.444 seconds]
©2003-2014 Jasper Spaans. Advertise on this site