qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 06/12] accel/tcg: better handle memory constrained systems


From: Richard Henderson
Subject: Re: [PATCH v2 06/12] accel/tcg: better handle memory constrained systems
Date: Wed, 22 Jul 2020 08:57:24 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 7/21/20 11:28 PM, Alex Bennée wrote:
> +        size_t phys_mem = qemu_get_host_physmem();
> +        if (phys_mem > 0 && phys_mem < (2 * DEFAULT_CODE_GEN_BUFFER_SIZE)) {
> +            tb_size = phys_mem / 8;
> +        } else {
> +            tb_size = DEFAULT_CODE_GEN_BUFFER_SIZE;
> +        }

I don't understand the 2 * DEFAULT part.

Does this make more sense as

    if (phys_mem == 0) {
        tb_size = default;
    } else {
        tb_size = MIN(default, phys_mem / 8);
    }

?


r~



reply via email to

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