qemu: domain: Simplify non-VFIO memLockLimit calculation for PPC64
@passthroughLimit is being calculated even if @usesVFIO is false. After that, an if-else conditional is used to check if we're going to sum it up with @baseLimit. This patch initializes @passthroughLimit to zero and always returns @memKB = @baseLimit + @passthroughLimit. The conditional is then used to calculate @passthroughLimit if @usesVFIO == true. This results in some cycles being spared for the @usesVFIO == false scenario, but the real motivation is to make the code simpler to add an alternative formula to calculate @passthroughLimit for NVLink2. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
Showing
想要评论请 注册 或 登录