]> Git Repo - qemu.git/commitdiff
accel/tcg: remove link between guest ram and TCG cache size
authorAlex Bennée <[email protected]>
Fri, 28 Feb 2020 19:24:13 +0000 (19:24 +0000)
committerRichard Henderson <[email protected]>
Sat, 29 Feb 2020 01:42:48 +0000 (17:42 -0800)
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
Cc: Igor Mammedov <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Niek Linnenbank <[email protected]>
Message-Id: <20200228192415[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
accel/tcg/translate-all.c

index 238b0e575bf16dace1406c34ad3607fb6c6cddab..5b66af783b5dd2b5b0b9ccd3cb945ad4e7537db8 100644 (file)
@@ -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;
This page took 0.031737 seconds and 4 git commands to generate.