From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
qemu-arm@nongnu.org, Laurent Vivier <laurent@vivier.eu>
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 [thread overview]
Message-ID: <87pne0w6rt.fsf@linaro.org> (raw)
In-Reply-To: <2ca7b55b-5674-370d-5c4d-dc8b7782ca64@linaro.org>
Richard Henderson <richard.henderson@linaro.org> 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
WARNING: multiple messages have this Message-ID (diff)
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org,
Laurent Vivier <laurent@vivier.eu>
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 [thread overview]
Message-ID: <87pne0w6rt.fsf@linaro.org> (raw)
In-Reply-To: <2ca7b55b-5674-370d-5c4d-dc8b7782ca64@linaro.org>
Richard Henderson <richard.henderson@linaro.org> 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
next prev parent reply other threads:[~2020-02-27 12:31 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 18:10 [PATCH v1 0/4] Fix codegen translation cache size Alex Bennée
2020-02-26 18:10 ` [PATCH v1 1/4] accel/tcg: use units.h for defining code gen buffer sizes Alex Bennée
2020-02-26 18:10 ` Alex Bennée
2020-02-26 22:00 ` Niek Linnenbank
2020-02-26 22:00 ` Niek Linnenbank
2020-02-26 22:49 ` Richard Henderson
2020-02-27 10:54 ` Philippe Mathieu-Daudé
2020-02-26 18:10 ` [PATCH v1 2/4] accel/tcg: remove link between guest ram and TCG cache size Alex Bennée
2020-02-26 18:10 ` Alex Bennée
2020-02-26 22:26 ` Niek Linnenbank
2020-02-26 22:26 ` Niek Linnenbank
2020-02-26 22:50 ` Richard Henderson
2020-02-26 22:50 ` Richard Henderson
2020-02-26 22:49 ` Richard Henderson
2020-02-26 22:49 ` Richard Henderson
2020-02-27 10:58 ` Philippe Mathieu-Daudé
2020-02-27 10:58 ` Philippe Mathieu-Daudé
2020-02-26 18:10 ` [PATCH v1 3/4] accel/tcg: only USE_STATIC_CODE_GEN_BUFFER on 32 bit hosts Alex Bennée
2020-02-26 18:10 ` Alex Bennée
2020-02-26 22:50 ` Richard Henderson
2020-02-27 10:55 ` Philippe Mathieu-Daudé
2020-02-27 19:20 ` Niek Linnenbank
2020-02-27 19:20 ` Niek Linnenbank
2020-02-26 18:10 ` [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit Alex Bennée
2020-02-26 18:10 ` Alex Bennée
2020-02-26 22:45 ` Niek Linnenbank
2020-02-26 22:45 ` Niek Linnenbank
2020-02-27 12:19 ` Alex Bennée
2020-02-27 12:19 ` Alex Bennée
2020-02-27 19:01 ` Niek Linnenbank
2020-02-27 19:01 ` Niek Linnenbank
2020-02-26 22:55 ` Richard Henderson
2020-02-27 12:31 ` Alex Bennée [this message]
2020-02-27 12:31 ` Alex Bennée
2020-02-27 12:56 ` Richard Henderson
2020-02-27 12:56 ` Richard Henderson
2020-02-27 14:13 ` Igor Mammedov
2020-02-27 14:13 ` Igor Mammedov
2020-02-27 19:07 ` Niek Linnenbank
2020-02-27 19:07 ` Niek Linnenbank
2020-02-28 7:47 ` Igor Mammedov
2020-02-28 7:47 ` Igor Mammedov
2020-02-28 19:20 ` Alex Bennée
2020-02-28 19:20 ` Alex Bennée
2020-02-28 7:54 ` [PATCH] " Alex Bennée
2020-02-28 7:54 ` Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pne0w6rt.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=laurent@vivier.eu \
--cc=pbonzini@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.