[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables
From: |
Stefan Hajnoczi |
Subject: |
Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables |
Date: |
Tue, 26 Oct 2021 17:34:26 +0100 |
On Tue, Oct 26, 2021 at 08:10:16AM -0700, Richard Henderson wrote:
> On 10/26/21 6:22 AM, Stefan Hajnoczi wrote:
> > If "safe" TLS variables are opt-in then we'll likely have obscure bugs
> > when code changes to access a TLS variable that was previously never
> > accessed from a coroutine. There is no compiler error and no way to
> > detect this. When it happens debugging it is painful.
>
> Co-routines are never used in user-only builds.
If developers have the choice of using __thread then bugs can slip
through.
Your assembly get_addr() approach reduces the performance overhead of
TLS getters/setters.
Are you concerned about performance, the awkwardness of calling
getters/setters, or something else for qemu-user?
Stefan
signature.asc
Description: PGP signature
- Re: [RFC 1/2] tls: add macros for coroutine-safe TLS variables, (continued)
[RFC 2/2] util/async: replace __thread with QEMU TLS macros, Stefan Hajnoczi, 2021/10/25
Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables, Philippe Mathieu-Daudé, 2021/10/25
Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables, Richard Henderson, 2021/10/25
- Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables, Warner Losh, 2021/10/25
- Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables, Stefan Hajnoczi, 2021/10/26
- Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables, Richard Henderson, 2021/10/26
- Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables,
Stefan Hajnoczi <=
- Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables, Richard Henderson, 2021/10/26
- Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables, Thomas Huth, 2021/10/26
- Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables, Richard Henderson, 2021/10/26
- Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables, Kevin Wolf, 2021/10/27
- Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables, Stefan Hajnoczi, 2021/10/27