Re: [patch] tls-2.5.31-D5

Ingo Molnar
2002-08-12T15:38:38Z

On Mon, 12 Aug 2002, Jakub Jelinek wrote:

> As each supported TLS entry has its context-switch time cost, I think we
> should stay at 2 supported TLS entries.

4 are almost as good - and they also solve the 0x40 problem.

> My understanding was that the GDT patches were written to optimize the
> common case (all threaded apps using LDT and with the advent of __thread
> support causing every single application to use LDT), with 2 TLS entries
> where one is for libc/libpthread and the other one is for application
> usage I think it is enough for 99.9% of apps. In the rare case someone
> needs more, there is still LDT which offers 8192 entries.

well, i think i have to agree ... if it wasnt for Wine's 0x40 descriptor.
But it certainly does not come free. We could have 3 TLS entries (0x40
will be the last entry), and the copying cost is 9 cycles. (compared to 6
cycles in the 2 entries case.) Good enough?

Ingo