From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 89DC31FF0DE for ; Thu, 19 Nov 2026 13:28:00 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 907412168C; Thu, 19 Nov 2026 13:27:59 +0100 (CET) Content-Type: text/plain; charset=UTF-8 Date: Thu, 19 Nov 2026 13:27:56 +0100 Message-Id: To: "Dominik Rusovac" , Subject: Re: [PATCH proxmox v2 02/19] resource-scheduling: scheduler: refine score_* docs From: "Daniel Kral" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: aerc 0.22.0-45-gc30c872fde7b-dirty References: <20261112094437.1951271-1-d.rusovac@proxmox.com> <20261112094437.1951271-3-d.rusovac@proxmox.com> In-Reply-To: <20261112094437.1951271-3-d.rusovac@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795091276275 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.445 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: B5KATPI3QFMGZWPXK5DENTI2WEU75KUP X-Message-ID-Hash: B5KATPI3QFMGZWPXK5DENTI2WEU75KUP X-MailFrom: d.kral@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu Nov 12, 2026 at 10:44 AM CET, Dominik Rusovac wrote: > to be more precise, refine parts of docs of functions responsible for > scoring migration candidates and selecting node to start service on, > respectively > > Signed-off-by: Dominik Rusovac > --- > > Notes: > new, split out of patch [0] in v1 > =20 > respective changes: > * slightly reword docs > =20 > [0] https://lore.proxmox.com/all/20261021085932.1196302-4-d.rusovac@p= roxmox.com/ > > proxmox-resource-scheduling/src/scheduler.rs | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/proxmox-resource-scheduling/src/scheduler.rs b/proxmox-resou= rce-scheduling/src/scheduler.rs > index 9078fa72..60e60d3c 100644 > --- a/proxmox-resource-scheduling/src/scheduler.rs > +++ b/proxmox-resource-scheduling/src/scheduler.rs > @@ -228,15 +228,15 @@ impl Scheduler { > }) > } > =20 > - /// Scores the given migration `candidates` by the best node imbalan= ce improvement with > - /// exhaustive search. > + /// Uses bruteforce search to score how much each of the given migra= tion `candidates` improves > + /// node imbalance and ranks them accordingly. nit: if possible start this with 'Scores'/'Ranks' here as well just to be consistent with the TOPSIS doc > /// > /// The `candidates` are assumed to be consistent with the scheduler= . No further validation is > /// done whether the given nodenames actually exist in the scheduler= . > /// > /// The scoring is done as if each resource migration has already be= en done. This assumes that > /// the already migrated resource consumes the same amount of each s= tat as on the previous node > - /// according to its `stats`. > + /// according to its `stats`. The lower the score, the better. > /// > /// Returns up to `limit` of the best scored migrations. > pub fn score_best_balancing_migration_candidates( > @@ -269,8 +269,7 @@ impl Scheduler { > best_migrations > } > =20 > - /// Scores the given migration `candidates` by the best node imbalan= ce improvement with the > - /// TOPSIS method. > + /// Scores the given migration `candidates` using the TOPSIS method. nit: maybe use 'Ranks' here as well and clarify that the 'score_' is a misnomer in the commit message (I'm sorry ;-)) > /// > /// The `candidates` are assumed to be consistent with the scheduler= . No further validation is > /// done whether the given nodenames actually exist in the scheduler= . > @@ -321,7 +320,8 @@ impl Scheduler { > .collect()) > } > =20 > - /// Scores nodes to start a resource with the usage statistics `reso= urce_stats` on. > + /// Scores nodes to start a resource with the usage statistics `reso= urce_stats` on, using the > + /// TOPSIS method. Here scoring is the accurate description of course, because it does not sort/rank them, just scoring. > /// > /// The scoring is done as if the resource is already started on eac= h node. This assumes that > /// the already started resource consumes the maximum amount of each= stat according to its