[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for
From: |
Alex Bennée |
Subject: |
Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit |
Date: |
Thu, 27 Feb 2020 12:31:50 +0000 |
User-agent: |
mu4e 1.3.8; emacs 27.0.60 |
Richard Henderson <address@hidden> writes:
> On 2/26/20 10:10 AM, Alex Bennée wrote:
>> While 32mb is certainly usable a full system boot ends up flushing the
>> codegen buffer nearly 100 times. Increase the default on 64 bit hosts
>> to take advantage of all that spare memory. After this change I can
>> boot my tests system without any TB flushes.
>
>> +#if TCG_TARGET_REG_BITS == 32
>> #define DEFAULT_CODE_GEN_BUFFER_SIZE_1 (32 * MiB)
>> +#else
>> +#define DEFAULT_CODE_GEN_BUFFER_SIZE_1 (2 * GiB)
>> +#endif
>
> This particular number, I'm not so sure about.
>
> It makes sense for a lone vm, running in system mode, on a large-ish host.
> It's more questionable for a large-ish host running many system mode vm's,
> although one can tune that from the command-line, so perhaps it's
> still ok.
Yeah it would be nice to get some feedback from users. I suspect system
emulation means the mmap is less efficient due to the sharding of the
translation buffer.
> It does not make sense for a linux-user chroot, running make -jN, on just
> about
> any host. For linux-user, I could be happy with a modest increase, but not
> all
> the way out to 2GiB.
>
> Discuss.
Does it matter that much? Surely for small programs the kernel just
never pages in the used portions of the mmap?
That said does linux-user have a better idea of the size of the problem
set before we start running? Could we defer calling tcg_exec_init until
we have mapped in the main executable and then size based on that?
>
>
> r~
--
Alex Bennée
- Re: [PATCH v1 2/4] accel/tcg: remove link between guest ram and TCG cache size, (continued)
- [PATCH v1 3/4] accel/tcg: only USE_STATIC_CODE_GEN_BUFFER on 32 bit hosts, Alex Bennée, 2020/02/26
- [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit, Alex Bennée, 2020/02/26
- Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit, Richard Henderson, 2020/02/26
- Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit,
Alex Bennée <=
- Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit, Richard Henderson, 2020/02/27
- Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit, Igor Mammedov, 2020/02/27
- Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit, Niek Linnenbank, 2020/02/27
- Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit, Igor Mammedov, 2020/02/28
- Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit, Alex Bennée, 2020/02/28
- [PATCH] accel/tcg: increase default code gen buffer size for 64 bit, Alex Bennée, 2020/02/28