qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 21/22] tcg: enable per-thread TCG for softmmu


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 21/22] tcg: enable per-thread TCG for softmmu
Date: Sun, 9 Jul 2017 11:48:53 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 07/09/2017 11:29 AM, Emilio G. Cota wrote:
On Sun, Jul 09, 2017 at 11:19:37 -1000, Richard Henderson wrote:
On 07/08/2017 09:50 PM, Emilio G. Cota wrote:
This allows us to generate TCG code in parallel. MTTCG already uses
it, although the next commit pushes down a lock to actually
perform parallel generation.

User-mode is kept out of this: contention due to concurrent translation
is more commonly found in full-system mode.

Um, why do you believe that?  Are you suggesting that a multi-threaded
user-only guest is much more likely to share TBs and do much less code
generation total?

Exactly. Also, in user-mode "vCPU threads" (i.e. host threads) come and
go all the time, so this doesn't work well with having a single
code_gen_buffer, which I assumed was non-negotiable.

Ah, yes. For any subdivision N of code_gen_buffer that we choose, at some point we may have N+1 threads and need to do Something Else.

That's probably something worth commenting somewhere with the "first" #ifndef CONFIG_USER_ONLY.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]