Date: Thu, 19 Jun 2003 16:41:58 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: Julian Elischer <julian@elischer.org> Cc: threads@freebsd.org Subject: Re: Implementing TLS: step 1 Message-ID: <20030619234158.GE1273@dhcp01.pn.xcllnt.net> In-Reply-To: <Pine.BSF.4.21.0306191605490.41210-100000@InterJet.elischer.org> References: <Pine.BSF.4.21.0306191543000.41210-100000@InterJet.elischer.org> <Pine.BSF.4.21.0306191605490.41210-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 19, 2003 at 04:12:50PM -0700, Julian Elischer wrote: > > > BTW Marcel, I think that we can get from where we are now with kse to > what we need by just a little massaging of what points to what. > it is possible that the register %gs could be pointed to the thread > structure directly and we could derive the KSE from that. it will just > make the context switches a fraction more expensive if we need to > change the segment register.. Yes. On i386 because the indirection through %gs:0x0 allows having %gs point anything we like: the KSE. On ia64 there's room for a pointer at offset 8 in the TLS that we can use to point to whatever we like. That context switches involve an additional pointer fiddle to make sure we always have the indirection to the KSE is something I don't worry about. > On ia64 we don;t need to use descriptors so there is not that limit so > in effect we could point directly to the thread descriptor and let THAT > point to teh VCPU mailbox in question. it's just an extra write or two > at context switch time. I think we'll be just fine. Agreed. As long as we have the right abstraction in libkse (by means of MD headers/macros or whatever), we should not have to worry too much about it. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030619234158.GE1273>