Re: [PATCH proxmox v3 09/40] resource-scheduling: implement rebalancing migration selection

Dominik Rusovac
2026-03-31T07:33:22Z

lgtm, consider this

On Mon Mar 30, 2026 at 4:30 PM CEST, Daniel Kral wrote:
> Assuming that a resource will hold the same dynamic resource usage on a
> new node as on the previous node, score possible migrations, where:
>
> - the cluster node imbalance is minimal (bruteforce), or
> - the shifted root mean square and maximum resource usages of the cpu
> and memory is minimal across the cluster nodes (TOPSIS).
>
> Signed-off-by: Daniel Kral <d.kral@proxmox.com>
> ---
> changes v2 -> v3:
> - fix wording in ScoredMigration::new() documentation
> - use f64::powi instead of f64::powf in ScoredMigration::new()
> - adapt wording in MigrationCandidate `stats` member documentation
> - only compare order of return value of
> score_best_balancing_migration_candidates{,_topsis}() in test cases
> instead of equal between the imbalance scores
> - introduce rank_best_balancing_migration_candidates{,_topsis}() for the
> test cases for reduced code duplication
> - use assert! instead of bail! wherever appropriate
>

[snip]