Re: 2.4, 2.6, i686/athlon and LDT's

From: Arjan van de Ven
Date: Mon Dec 27 2004 - 16:30:18 EST


On Mon, 2004-12-27 at 15:55 -0500, Brian Gerst wrote:
> Arjan van de Ven wrote:
> > On Mon, 2004-12-27 at 11:46 -0800, Tymm Twillman wrote:
> >
> >>Hi all,
> >
> >
> >>It appears that use of the LDT is to speed up context switching between
> >>threads, although I haven't even found especially good references WRT
> >>that. I have looked through the info in the IA Developers publications
> >>and have whacked my head against Google quite a bit. However, every bit
> >>of clarity I've found there has been offset by new confuzled bits.
> >
> >
> > LDT's are *slow*. That's why glibc will try to avoid using them
> > nowadays, and with 2.6 it won't; as for 2.4.. it depends if you use a
> > vendor 2.4 it might be able to avoid using LDT's as well.
>
> Using the LDT isn't inherently slower, since the cpu caches the segment
> descriptor regardless of if it came from the GDT or LDT.

it does however increase context switch costs significantly since the
LDT needs to be reloaded and reverified...


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/