qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 04/28] tcg: Remove error return from tcg_region_initial_al


From: Richard Henderson
Subject: Re: [PATCH v3 04/28] tcg: Remove error return from tcg_region_initial_alloc__locked
Date: Tue, 8 Jun 2021 08:44:23 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 6/8/21 4:04 AM, Alex Bennée wrote:

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

All callers immediately assert on error, so move the assert
into the function itself.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

The change itself seems reasonable although I do find the return values
of the underlying tcg_region_alloc__locked a little confusing. What we
are saying is the initial allocation should never fail but subsequent
allocations aren't actually fails but creation of new regions?

Sort of. If we get a failure during initial allocation, it's because we didn't actually create enough regions (ncpu > nregions).

During the normal course of events, a failure indicates that we've run out of clean regions and need to flush the entire buffer.


r~



reply via email to

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