all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Rusovac <d.rusovac@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH proxmox v3 02/19] resource-scheduling: scheduler: refine score_* docs
Date: Tue,  1 Dec 2026 11:16:42 +0100	[thread overview]
Message-ID: <20261201101659.3690943-3-d.rusovac@proxmox.com> (raw)
In-Reply-To: <20261201101659.3690943-1-d.rusovac@proxmox.com>

to be more precise, refine parts of docs of functions starting with
'score_', which is a misnomer in
'score_best_balancing_migration_candidates{_topsis}', because the
respective functions ultimately rank candidates based on scores

Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com>
---

Notes:
    changes since v2:
    * clarify that 'score_' is a misnomer in commit body
    * start bruteforce docs with 'Scores'
    * use 'ranks' in topsis docs
    
    new, split out of patch [0] in v1
    
    respective changes:
    * slightly reword docs
    
    [0] https://lore.proxmox.com/all/20261021085932.1196302-4-d.rusovac@proxmox.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-resource-scheduling/src/scheduler.rs
index 9078fa72..bdaf5cb3 100644
--- a/proxmox-resource-scheduling/src/scheduler.rs
+++ b/proxmox-resource-scheduling/src/scheduler.rs
@@ -228,15 +228,15 @@ impl Scheduler {
         })
     }
 
-    /// Scores the given migration `candidates` by the best node imbalance improvement with
-    /// exhaustive search.
+    /// Scores how much each of the given migration `candidates` improves node imbalance using
+    /// bruteforce search and ranks them accordingly.
     ///
     /// 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 been done. This assumes that
     /// the already migrated resource consumes the same amount of each stat 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<I>(
@@ -269,8 +269,7 @@ impl Scheduler {
         best_migrations
     }
 
-    /// Scores the given migration `candidates` by the best node imbalance improvement with the
-    /// TOPSIS method.
+    /// Scores the given migration `candidates` using the TOPSIS method and ranks them accordingly.
     ///
     /// 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())
     }
 
-    /// Scores nodes to start a resource with the usage statistics `resource_stats` on.
+    /// Scores nodes to start a resource with the usage statistics `resource_stats` on, using the
+    /// TOPSIS method.
     ///
     /// The scoring is done as if the resource is already started on each node. This assumes that
     /// the already started resource consumes the maximum amount of each stat according to its
-- 
2.47.3





  parent reply	other threads:[~2026-12-01 10:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 10:16 [RFC PATCH-SERIES cluster/ha-manager/manager/proxmox{,-perl-rs} v3 00/19] fix #7993: implement weighted crs load balancing Dominik Rusovac
2026-12-01 10:16 ` [PATCH proxmox v3 01/19] resource-scheduling: fix typos Dominik Rusovac
2026-12-01 10:16 ` Dominik Rusovac [this message]
2026-12-01 10:16 ` [PATCH proxmox v3 03/19] resource-scheduling: scheduler: abstract post-migration stats logic Dominik Rusovac
2026-12-01 10:16 ` [PATCH proxmox v3 04/19] resource-scheduling: node: add weighted node load Dominik Rusovac
2026-12-01 10:16 ` [PATCH proxmox v3 05/19] resource-scheduling: scheduler: make imbalance with candidate public Dominik Rusovac
2026-12-01 10:16 ` [PATCH proxmox v3 06/19] fix #7993: resource-scheduling: scheduler: add weights Dominik Rusovac
2026-12-01 10:16 ` [PATCH proxmox v3 07/19] workspace,resource-scheduling: add proptest as dev-dependency Dominik Rusovac
2026-12-01 10:16 ` [PATCH proxmox v3 08/19] resource-scheduling: scheduler: add property tests for weights Dominik Rusovac
2026-12-01 10:16 ` [PATCH proxmox-perl-rs v3 09/19] fix #7993: pve-rs: resource-scheduling: add scheduler options Dominik Rusovac
2026-12-01 10:16 ` [PATCH pve-cluster v3 10/19] fix #7993: datacenter config: add ha-{cpu,mem}-weight crs options Dominik Rusovac
2026-12-01 10:16 ` [PATCH pve-manager v3 11/19] ui: form: crs options: make fine-tuning options advanced Dominik Rusovac
2026-12-01 10:16 ` [PATCH pve-manager v3 12/19] fix #7993: ui: form: crs options: add weights Dominik Rusovac
2026-12-01 10:16 ` [PATCH pve-ha-manager v3 13/19] manager: remove obsolete argument Dominik Rusovac
2026-12-01 10:16 ` [PATCH pve-ha-manager v3 14/19] manager: rename update_crs_scheduler_mode to update_crs_settings Dominik Rusovac
2026-12-01 10:16 ` [PATCH pve-ha-manager v3 15/19] manager: factor out crs option update helper Dominik Rusovac
2026-12-01 10:16 ` [PATCH pve-ha-manager v3 16/19] manager: log changes to crs settings Dominik Rusovac
2026-12-01 10:16 ` [PATCH pve-ha-manager v3 17/19] sim: hardware: allow changing datacenter settings at runtime Dominik Rusovac
2026-12-01 10:16 ` [PATCH pve-ha-manager v3 18/19] fix #7993: manager,usage: use weights for static and dynamic mode Dominik Rusovac
2026-12-01 10:16 ` [PATCH pve-ha-manager v3 19/19] test: add automatic rebalancing test cases with weights Dominik Rusovac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261201101659.3690943-3-d.rusovac@proxmox.com \
    --to=d.rusovac@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal