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] Re: NPTL/TLS "emulation" idea (fwd)

To: Rik van Riel <riel@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: NPTL/TLS "emulation" idea (fwd)
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 20 Oct 2004 17:40:12 +0100
Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx, jakub@xxxxxxxxxx, roland@xxxxxxxxxx
Delivery-date: Wed, 20 Oct 2004 17:49:21 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Wed, 20 Oct 2004 12:14:08 EDT." <Pine.LNX.4.44.0410201205440.21939-100000@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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
> > With no /lib/tls this takes ~180ms. With emulation it takes
> > ~300ms. With the new technique it's ~390ms -- so about a further 30%
> > slowdown, or 115% slowdown overall.
> 
> Considering how system heavy this workload is, that's
> probably not even that bad.

200ms of pure CPU overhead is abysmal!

> > The extra cost is due to the fact that we fault nearly twice as often
> > because -ve and +ve accesses seem pretty neatly interleaved. So we
> > fault on all GS accesses, rather than just the -ve ones. :-(
> 
> IIRC the glibc private data is accessed once per system
> call, or possibly on both system call entrance and exit.
> 
> Less system heavy tasks probably do not have an overhead
> as bad as ls -R.

Just booting a minimal Fedora Core distribution takes 2.5 *million*
faults. The slowdown is noticeable.

More feasible long-term solutions include:

 1. Modify the ABI to disallow -ve accesses [sounds like this
    possibility is vetoed by Ulrich Drepper].

 2. Provide alternative apps/libraries that do not cause -ve accesses.

 3. If both FS and GS are reserved for glibc, we could indeed have one
    for +ve accesses and one for -ve accesses. This oculd be
    implemented either in user space --- i.e., rewrite glibc, and
    possibly gcc, to use both registers --- or by binary rewriting in
    the kernel (but problems with the patches getting committed to
    disc!!). 

 -- Keir


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel