From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id B94411FF165 for ; Thu, 31 Jul 2025 05:22:16 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 253CA30B36; Thu, 31 Jul 2025 05:23:41 +0200 (CEST) Message-ID: Date: Thu, 31 Jul 2025 05:23:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta From: Thomas Lamprecht To: Proxmox VE development discussion , Lukas Wagner , Aaron Lauterer References: <20250726010626.1496866-1-a.lauterer@proxmox.com> <20250726010626.1496866-5-a.lauterer@proxmox.com> Content-Language: en-US In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753932175720 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.031 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 Subject: Re: [pve-devel] [PATCH cluster v4 1/2] status: introduce new pve-{type}- rrd and metric format 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" Am 29.07.25 um 11:44 schrieb Lukas Wagner: >> +// A 4k buffer should be plenty to temporarily store RRD data. 64 bit integers are 20 chars long, >> +// plus the separator char: (4096-1)/21~195 columns This buffer is only used in the >> +// `update_rrd_data` function. It is safe to use as the calling sites get the global mutex: >> +// rrd_update_data -> rrdentry_hash_set -> cfs_status_set / and cfs_kvstore_node_set >> +static char rrd_format_update_buffer[4096]; > Maybe I'm missing something, but since this is only used in the > update_rrd_data function, is there any reason why this statically > allocated and not just malloc'd as needed? For the record: I nudged Aaron in that direction in a previous review, IMO a small static buffer can sometimes be easier to handle compared to malloc, and definitively could be more performant that frequent malloc+free sequences, but performance probably is not really impacted here in any case. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel