Re: [Qemu-devel] [PATCH v2 43/45] tcg: introduce regions to split code_gen_buffer

2017-07-18 Thread Emilio G. Cota
On Mon, Jul 17, 2017 at 19:09:28 -1000, Richard Henderson wrote: > On 07/16/2017 10:04 AM, Emilio G. Cota wrote: > >+#ifdef CONFIG_SOFTMMU > >+/* > >+ * It is likely that some vCPUs will translate more code than others, so we > >+ * first try to set more regions than smp_cpus, with those regions be

Re: [Qemu-devel] [PATCH v2 43/45] tcg: introduce regions to split code_gen_buffer

2017-07-17 Thread Richard Henderson
On 07/16/2017 10:04 AM, Emilio G. Cota wrote: +#ifdef CONFIG_SOFTMMU +/* + * It is likely that some vCPUs will translate more code than others, so we + * first try to set more regions than smp_cpus, with those regions being + * larger than the minimum code_gen_buffer size. If that's not possible

[Qemu-devel] [PATCH v2 43/45] tcg: introduce regions to split code_gen_buffer

2017-07-16 Thread Emilio G. Cota
This is groundwork for supporting multiple TCG contexts. The naive solution here is to split code_gen_buffer statically among the TCG threads; this however results in poor utilization if translation needs are different across TCG threads. What we do here is to add an extra layer of indirection, a