WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Question about /lib/tls

To: "Nuutti Kotivuori" <naked@xxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Question about /lib/tls
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Fri, 24 Dec 2004 22:49:46 -0000
Delivery-date: Fri, 24 Dec 2004 22:51:16 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Thread-index: AcToKf0QNiJOshB4QEWkzNOWKJ94UQB3t3xA
Thread-topic: [Xen-devel] Question about /lib/tls
> As I understand it - emulating the standard /lib/tls 
> behaviour efficiently and properly with Xen is tricky. 
> However, a change in libc could make it easier to implement 
> or something? And this change could work with Xen and outside Xen?

Yes, with a few modifications to glibc we'd have a library that worked
fine on Xen and also on native Linux. I seriously doubt there'd be any
measureable performance loss.

The other problem is that the very latest versions of gcc will also
generate problematic code if the program uses the new thread local
variable attribute. Fortunately, almost nothing does right now. There's
already a flag to cause gcc to generate code that doesn't generate -ve
segment offsets, but its not the default. It would be great if it was...

We just haven't had time to look into modifying libc, but it would be
great if someone could. I'd probably modify Xen's seg fixup code to
print out EIPs to collect a hit list of the most frequently executed
problematic cases, then go and fix those in the source: rather than
doing a -ve segment offset, access gs:0 to read out the start of the
thread control block, then access tcb_start-offset. The only slight
problem is that a register needs to be used to hold the tcb_start value,
so there might need to be a bit of juggling with the stack if there
isn't an obvious unused register.  

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>