From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Florian Weimer <fweimer@redhat.com>,
xen-devel@lists.xenproject.org, libc-alpha@sourceware.org
Subject: Re: -mno-tls-direct-seg-refs support in glibc for i386 PV Xen
Date: Wed, 27 May 2020 15:44:41 +0200 [thread overview]
Message-ID: <20200527134441.y5dta4n2dm3ftlmw@function> (raw)
In-Reply-To: <551ceac2-9cf6-00fd-95a6-a5b9fea6a383@citrix.com>
Hello,
Andrew Cooper via Libc-alpha, le mer. 27 mai 2020 14:39:00 +0100, a ecrit:
> Why does the MSB make any difference? %gs still needs to remain intact
> so the thread pointer can be pulled out, so there is nothing that Xen or
> Linux can do in the way of lazy loading.
>
> Beyond that, its straight up segment base semantics in x86. There will
> be a 1-cycle AGU delay from a non-zero base, but that nothing to do with
> Xen and applies to all segment based TLS accesses on x86, and you'll win
> that back easily through reduced register pressure.
>
> Are there any further details on the perf problem claim? I find it
> suspicious.
The concern is not about the indirection.
The concern is that to keep safe from the guest, the hypervisor has to
restrict the size of the segment, and thus negative offsets, used in the
i386 TLS model, are rejected by the processor, and the hypervisor has to
emulate these access, thus a high cost.
Samuel
next prev parent reply other threads:[~2020-05-27 13:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 13:03 -mno-tls-direct-seg-refs support in glibc for i386 PV Xen Florian Weimer
2020-05-27 13:39 ` Andrew Cooper
2020-05-27 13:44 ` Samuel Thibault [this message]
2020-05-27 14:15 ` Andrew Cooper
2020-05-27 14:20 ` Florian Weimer
2020-05-27 14:00 ` Jan Beulich
2020-05-27 14:40 ` Andrew Cooper
2020-05-27 15:25 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200527134441.y5dta4n2dm3ftlmw@function \
--to=samuel.thibault@ens-lyon.org \
--cc=andrew.cooper3@citrix.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.