[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/6] target/i386/translate: use thread-local sto
From: |
Emilio G. Cota |
Subject: |
Re: [Qemu-devel] [PATCH 5/6] target/i386/translate: use thread-local storage in !user-mode |
Date: |
Mon, 10 Sep 2018 08:30:20 -0400 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Mon, Sep 10, 2018 at 10:17:53 +0100, Alex Bennée wrote:
>
> Emilio G. Cota <address@hidden> writes:
>
> > Needed for MTTCG.
> >
> > Signed-off-by: Emilio G. Cota <address@hidden>
> > ---
> > target/i386/translate.c | 24 ++++++++++++++++--------
> > 1 file changed, 16 insertions(+), 8 deletions(-)
> >
> > diff --git a/target/i386/translate.c b/target/i386/translate.c
> > index 1f9d1d9b24..9a6a72e205 100644
> > --- a/target/i386/translate.c
> > +++ b/target/i386/translate.c
> > @@ -71,26 +71,34 @@
> >
> > //#define MACRO_TEST 1
> >
> > +/* we need thread-local storage for mttcg */
> > +#ifdef CONFIG_USER_ONLY
> > +#define I386_THREAD
> > +#else
> > +#define I386_THREAD __thread
> > +#endif
> > +
>
> I'm confused - as we can have multi-threaded user space don't the same
> requirements apply?
In user-mode, code generation is serialized by mmap_lock.
Making these per-thread would just waste TLS space.
E.
[Qemu-devel] [PATCH 2/6] test-rcu-list: avoid torn accesses to n_reclaims and n_nodes_removed, Emilio G. Cota, 2018/09/03
[Qemu-devel] [PATCH 1/6] qsp: drop atomics when using the seqlock, Emilio G. Cota, 2018/09/03