From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 0ACA61FF16F for ; Tue, 2 Sep 2025 09:32:53 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D05AEB11D; Tue, 2 Sep 2025 09:33:04 +0200 (CEST) Mime-Version: 1.0 Date: Tue, 02 Sep 2025 09:32:30 +0200 Message-Id: To: "Proxmox VE development discussion" Cc: "pve-devel" From: =?utf-8?q?Michael_K=C3=B6ppl?= X-Mailer: aerc 0.20.1 References: <20250821143705.256562-1-d.kral@proxmox.com> <20250821143705.256562-11-d.kral@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1756798336942 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.023 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [rules.pm, proxmox.com] Subject: Re: [pve-devel] [PATCH ha-manager 10/18] compile ha rules to a more compact representation X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On Fri Aug 29, 2025 at 3:42 PM CEST, Daniel Kral wrote: >>> diff --git a/src/PVE/HA/Rules.pm b/src/PVE/HA/Rules.pm >>> index a075feac..d7593532 100644 >>> --- a/src/PVE/HA/Rules.pm >>> +++ b/src/PVE/HA/Rules.pm >>> @@ -47,6 +47,12 @@ Each I is required to implement the methods C>, >>> C>, and C> from the C> to >>> extend the properties of this I with plugin-specific properties. >>> >>> +Each I is required to implement the method >>> +Cplugin_compile(...) >>> to distill a compiled >>> +representation of the more verbose C<$rules> from the config file, which is >>> +returned by Ccompile(...) >>> to be more appropriate >>> +and efficient for the scheduler and other users. >> >> Is this supposed to say "other uses" or do you actually mean "other >> users"? Do you mean that this more efficient representation can (and >> probably should) be used for other uses cases when e.g. iterating over >> only resource affinity rules? > > With "users" I meant other call sites that use the compiled rules > instead of the rules. As the helpers were converted to using the > compiled rules now too, many call sites are 'required' to use the > compiled rules anyway to be able to use these rule helpers (e.g. > get_node_affinity, get_affinitive_resources, ...). > > If there's a better term I'm happy to change it. I see, thanks for the explanation. I mean maybe something like "and other calling functions", but it might also just have been me. It does make sense the way you explained it and I assumed that's what you meant, but wanted to be sure. > > > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel