qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb
Date: Fri, 18 Sep 2015 09:18:17 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 09/18/2015 06:08 AM, Peter Maydell wrote:
> You're still not allowing for your worst-case datatable size when we
> calculate tcg_ctx.code_gen_buffer_max_size.

Hum.  What factor do you suggest?

The maximum table expansion is of course going to depend on the target, since
the "extra words" could conceivably encode badly.  See mips, sh4 "flags".

For a "normal" target with no, or "small" extra words (cc_op is never large,
nor is the arm condexec), the max expansion per-opcode would appear to be a
long sequence of nops, where the opcodes emitted would consist solely of
insn_start.  The table would consume (2+extra) bytes per nop.  Since state is
not changing, all but the PC column would be zeros.

Would you be happy if I simply arbitrarily bumped the other magic number here,
TCG_MAX_OP_SIZE?  Adjust it from 192 to 200, or something?

I didn't try to add a guard page yet, since our logic in allocating the code
gen buffer are a bit confused.  I'm a bit surprised that we don't prefer mmap
all of the time.


r~



reply via email to

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