All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: NPTL/TLS "emulation" idea (fwd)
@ 2004-10-20 13:27 Rik van Riel
  2004-10-20 14:38 ` Keir Fraser
  0 siblings, 1 reply; 13+ messages in thread
From: Rik van Riel @ 2004-10-20 13:27 UTC (permalink / raw)
  To: xen-devel

Hummm ok, so the list doesn't allow posting by non-members ...

---------- Forwarded message ----------
Date: Tue, 19 Oct 2004 12:45:01 -0700
From: Roland McGrath <roland@redhat.com>
To: Rik van Riel <riel@redhat.com>
Cc: xen-devel@lists.sourceforge.net, Jakub Jelinek <jakub@redhat.com>
Subject: Re: NPTL/TLS "emulation" idea

> A few weeks ago Roland, Jakub and myself brainstormed
> about this problem.  One of the things that came up is
> that the positive (glibc private data) and -ve (TLS)
> data are not generally used at the same time.

Well, that's not really true.  Small positive offsets are used all the time
(every syscall, for example, and all of pthreads internals).  Negative
offsets are used for actual ELF TLS accesses (__thread variables), which
now include `errno' in the standard glibc build.  So depending on your code
one or the other might be most common, but you are unlikely ever to have a
program run that doesn't flip back and forth a fair bit.  I really don't
have any clue what the fault-segment-flip-resume overhead vs the
fault-emulate-resume overhead is.  You'd just have to test it out.

I am still brainstorming about this, but I will need to do some experiments
to figure out how some other funny ways of using segments actually work.



-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: NPTL/TLS "emulation" idea (fwd)
@ 2004-10-20 13:28 Rik van Riel
  2004-10-20 14:42 ` Keir Fraser
  0 siblings, 1 reply; 13+ messages in thread
From: Rik van Riel @ 2004-10-20 13:28 UTC (permalink / raw)
  To: xen-devel

this one got dropped too, and might contain useful information

---------- Forwarded message ----------
Date: Tue, 19 Oct 2004 16:06:33 -0400
From: Jakub Jelinek <jakub@redhat.com>
To: Roland McGrath <roland@redhat.com>
Cc: Rik van Riel <riel@redhat.com>, xen-devel@lists.sourceforge.net
Subject: Re: NPTL/TLS "emulation" idea

On Tue, Oct 19, 2004 at 12:45:01PM -0700, Roland McGrath wrote:
> > A few weeks ago Roland, Jakub and myself brainstormed
> > about this problem.  One of the things that came up is
> > that the positive (glibc private data) and -ve (TLS)
> > data are not generally used at the same time.
>
> I am still brainstorming about this, but I will need to do some experiments
> to figure out how some other funny ways of using segments actually work.

If you allow modification of the user code by xen, then you can do
some tricks.  E.g. if an application doesn't ever use %fs segment,
you could rewrite the positive accesses from %gs segment prefix to
%fs segment prefix and have %gs be an expand-down segment while %fs
expand-up segment with the same base.

The problem with this is that things break badly if the application
wants to use %fs for its own purposes, or if it pokes at its own
code (writing can be avoided by temporarily write protecting any
pages where a rewrite has happened, but reading cannot).
There is always the PaX trick - halving the address space and having
non-overlapping %cs and %ds segments with some pages shared in between,
but perhaps that's too complicated.

	Jakub



-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-10-21  0:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-20 13:27 NPTL/TLS "emulation" idea (fwd) Rik van Riel
2004-10-20 14:38 ` Keir Fraser
2004-10-20 14:58   ` Rik van Riel
2004-10-20 15:32     ` Keir Fraser
2004-10-20 16:14       ` Rik van Riel
2004-10-20 16:40         ` Keir Fraser
2004-10-20 16:55           ` Rik van Riel
2004-10-20 17:09             ` Jakub Jelinek
2004-10-20 17:27               ` Keir Fraser
2004-10-20 18:21                 ` Jakub Jelinek
2004-10-21  0:56                   ` David Hopwood
2004-10-20 18:04             ` Ian Pratt
  -- strict thread matches above, loose matches on Subject: below --
2004-10-20 13:28 Rik van Riel
2004-10-20 14:42 ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.