[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Nvidia, TLS and __thread keyword -- an observation



David Xu wrote:
[ ... implicit TLS initialization and destruction ... ]

> I believe this will add overhead to thread creating and destroying,

Yes.  It will.  See my other posting for the tradeoffs.  The
complexity is not as bad as Marcel makes out, but it's still
a bad tradeoff for most existing threaded applications and
libraries, even if we thing more people will use implict TLS
as time goes on.

I think it's the wrong tradeoff, too.  I would make them burn
a general purpose register -- one that they are allowed to burn,
as an application -- on FreeBSD.  I have a hard time believing
that any of their functions use up all the registers, even on
a register-poor CISC architecture like x86; if they are that
complex, then they are doing so much stuff that explicit TLS
access overhead would be lost in the noise.

-- Terry

Visit your host, monkey.org