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: Alex Bennée
Subject: Re: [PATCH v2 06/12] accel/tcg: better handle memory constrained systems
Date: Wed, 22 Jul 2020 17:29:46 +0100
User-agent: mu4e 1.5.5; emacs 28.0.50

Richard Henderson <richard.henderson@linaro.org> writes:

> 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.

I figured once you had at least twice as much memory you could use the
full amount but...


> Does this make more sense as
>
>     if (phys_mem == 0) {
>         tb_size = default;
>     } else {
>         tb_size = MIN(default, phys_mem / 8);
>     }

This is probably a less aggressive tapering off which still doesn't
affect my 32gb dev machine ;-)

-- 
Alex Bennée



reply via email to

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