[prev in list] [next in list] [prev in thread] [next in thread]
List: qemu-arm
Subject: Re: [PATCH v2 2/4] accel/tcg: remove link between guest ram and TCG cache size
From: Niek Linnenbank <nieklinnenbank () gmail ! com>
Date: 2020-02-28 20:17:00
Message-ID: CAPan3WrZZ6FtkY+ZNkMwVuTTaXSk9_99dW4=0LwkDqkn0rWUZA () mail ! gmail ! com
[Download RAW message or body]
On Fri, Feb 28, 2020 at 8:24 PM Alex Bennée <alex.bennee@linaro.org> wrote:
> Basing the TB cache size on the ram_size was always a little heuristic
> and was broken by a1b18df9a4 which caused ram_size not to be fully
> realised at the time we initialise the TCG translation cache.
>
> The current DEFAULT_CODE_GEN_BUFFER_SIZE may still be a little small
> but follow-up patches will address that.
>
> Fixes: a1b18df9a4
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Cc: Niek Linnenbank <nieklinnenbank@gmail.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> ---
> accel/tcg/translate-all.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
> index 238b0e575bf..5b66af783b5 100644
> --- a/accel/tcg/translate-all.c
> +++ b/accel/tcg/translate-all.c
> @@ -938,15 +938,7 @@ static inline size_t size_code_gen_buffer(size_t
> tb_size)
> {
> /* Size the buffer. */
> if (tb_size == 0) {
> -#ifdef USE_STATIC_CODE_GEN_BUFFER
> tb_size = DEFAULT_CODE_GEN_BUFFER_SIZE;
> -#else
> - /* ??? Needs adjustments. */
> - /* ??? If we relax the requirement that CONFIG_USER_ONLY use the
> - static buffer, we could size this on RESERVED_VA, on the text
> - segment size of the executable, or continue to use the
> default. */
> - tb_size = (unsigned long)(ram_size / 4);
> -#endif
> }
> if (tb_size < MIN_CODE_GEN_BUFFER_SIZE) {
> tb_size = MIN_CODE_GEN_BUFFER_SIZE;
> --
> 2.20.1
>
>
--
Niek Linnenbank
[Attachment #3 (text/html)]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Fri, Feb 28, 2020 at 8:24 PM Alex Bennée <<a \
href="mailto:alex.bennee@linaro.org">alex.bennee@linaro.org</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Basing the TB cache \
size on the ram_size was always a little heuristic<br> and was broken by a1b18df9a4 \
which caused ram_size not to be fully<br> realised at the time we initialise the TCG \
translation cache.<br> <br>
The current DEFAULT_CODE_GEN_BUFFER_SIZE may still be a little small<br>
but follow-up patches will address that.<br>
<br>
Fixes: a1b18df9a4<br>
Signed-off-by: Alex Bennée <<a href="mailto:alex.bennee@linaro.org" \
target="_blank">alex.bennee@linaro.org</a>><br>
Reviewed-by: Richard Henderson <<a href="mailto:richard.henderson@linaro.org" \
target="_blank">richard.henderson@linaro.org</a>><br>
Tested-by: Philippe Mathieu-Daudé <<a href="mailto:philmd@redhat.com" \
target="_blank">philmd@redhat.com</a>><br></blockquote><div>Reviewed-by: Niek \
Linnenbank <<a href="mailto:nieklinnenbank@gmail.com">nieklinnenbank@gmail.com</a>></div><div> \
<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Cc: Niek Linnenbank <<a href="mailto:nieklinnenbank@gmail.com" \
target="_blank">nieklinnenbank@gmail.com</a>><br>
Cc: Igor Mammedov <<a href="mailto:imammedo@redhat.com" \
target="_blank">imammedo@redhat.com</a>><br>
---<br>
accel/tcg/translate-all.c | 8 --------<br>
1 file changed, 8 deletions(-)<br>
<br>
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c<br>
index 238b0e575bf..5b66af783b5 100644<br>
--- a/accel/tcg/translate-all.c<br>
+++ b/accel/tcg/translate-all.c<br>
@@ -938,15 +938,7 @@ static inline size_t size_code_gen_buffer(size_t tb_size)<br>
{<br>
/* Size the buffer. */<br>
if (tb_size == 0) {<br>
-#ifdef USE_STATIC_CODE_GEN_BUFFER<br>
tb_size = DEFAULT_CODE_GEN_BUFFER_SIZE;<br>
-#else<br>
- /* ??? Needs adjustments. */<br>
- /* ??? If we relax the requirement that CONFIG_USER_ONLY use the<br>
- static buffer, we could size this on RESERVED_VA, on the text<br>
- segment size of the executable, or continue to use the default. \
*/<br>
- tb_size = (unsigned long)(ram_size / 4);<br>
-#endif<br>
}<br>
if (tb_size < MIN_CODE_GEN_BUFFER_SIZE) {<br>
tb_size = MIN_CODE_GEN_BUFFER_SIZE;<br>
-- <br>
2.20.1<br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" \
class="gmail_signature"><div dir="ltr"><div>Niek \
Linnenbank<br><br></div></div></div></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic