[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path
From: |
Emilio G. Cota |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path |
Date: |
Mon, 4 Jul 2016 18:30:01 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Jul 04, 2016 at 12:45:52 +0100, Alex Bennée wrote:
>
> Emilio G. Cota <address@hidden> writes:
>
> > On Fri, Jul 01, 2016 at 17:16:10 +0100, Alex Bennée wrote:
> >> Lock contention in the hot path of moving between existing patched
> >> TranslationBlocks is the main drag in multithreaded performance. This
> >> patch pushes the tb_lock() usage down to the two places that really need
> >> it:
> >>
> >> - code generation (tb_gen_code)
> >> - jump patching (tb_add_jump)
> >>
> >> The rest of the code doesn't really need to hold a lock as it is either
> >> using per-CPU structures, atomically updated or designed to be used in
> >> concurrent read situations (qht_lookup).
> >>
> >> To keep things simple I removed the #ifdef CONFIG_USER_ONLY stuff as the
> >> locks become NOPs anyway until the MTTCG work is completed.
> >
> > From a scalability point of view it would be better to have a single
> > critical section.
>
> You mean merge the critical region for patching and code-generation?
Yes, I'd keep the lock held and drop it (if it was held) after the patching
is done, like IIRC we used to do:
(snip)
> > I propose to just extend the critical section, like we used to
> > do with tcg_lock_reset.
E.
- [Qemu-devel] [PATCH 0/2] Reduce lock contention on TCG hot-path, Alex Bennée, 2016/07/01
- [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path, Alex Bennée, 2016/07/01
- Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path, Richard Henderson, 2016/07/01
- Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path, Emilio G. Cota, 2016/07/01
- Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path, Alex Bennée, 2016/07/04
- Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path,
Emilio G. Cota <=
- Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path, Alex Bennée, 2016/07/05
- Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path, Paolo Bonzini, 2016/07/05
- Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path, Alex Bennée, 2016/07/05
- Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path, Paolo Bonzini, 2016/07/05
- Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path, Sergey Fedorov, 2016/07/05
- Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path, Alex Bennée, 2016/07/05
- Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path, Sergey Fedorov, 2016/07/05
[Qemu-devel] [PATCH 1/2] tcg: Ensure safe tb_jmp_cache lookup out of 'tb_lock', Alex Bennée, 2016/07/01