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-localstorage, and such usage is becoming more common; the PDA's use of it inthe kernel is no different. I would agree that using all the obscurecorners of segmentation is just asking for trouble, but using %gs as anaddress offset seems like something that's going to be efficient on x8632/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 testswhich showed there was flat out zero difference between using %fs and%gs. There doesn't seem to be anything to the theory that reloading anull segment selector is in any way cheaper than loading a realselector. Did you find a problem in my methodology?