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 8EE681FF137 for ; Tue, 14 Apr 2026 11:52:41 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5BB8E13353; Tue, 14 Apr 2026 11:53:29 +0200 (CEST) Message-ID: <37844ea3-9607-4b1f-84e8-8f3bbee5500e@proxmox.com> Date: Tue, 14 Apr 2026 11:53:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 pve-qemu 1/2] add patch to support using tcmalloc as the memory allocator To: Kefu Chai , pve-devel@lists.proxmox.com References: <20260414054645.405151-1-k.chai@proxmox.com> <20260414054645.405151-2-k.chai@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20260414054645.405151-2-k.chai@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1776160327368 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.007 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 Message-ID-Hash: EAWJ3XODMVTFDVVZBW237EO7WP7G3LRF X-Message-ID-Hash: EAWJ3XODMVTFDVVZBW237EO7WP7G3LRF X-MailFrom: f.ebner@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: Am 14.04.26 um 7:45 AM schrieb Kefu Chai: > Add allocator-aware memory release in the backup completion path: > since tcmalloc does not provide glibc's malloc_trim(), use the > tcmalloc-specific MallocExtension_ReleaseFreeMemory() API instead. > This function walks tcmalloc's page heap free span lists and calls > madvise(MADV_DONTNEED) -- it does not walk allocated memory or compact > the heap, so latency impact is negligible. > > Also adds a CONFIG_TCMALLOC meson define so the conditional compilation > in pve-backup.c can detect the allocator choice. > > Signed-off-by: Kefu Chai > Acked-by: Fiona Ebner > --- > ...use-tcmalloc-as-the-memory-allocator.patch | 77 +++++++++++++++++++ > debian/patches/series | 1 + > 2 files changed, 78 insertions(+) > create mode 100644 debian/patches/pve/0048-PVE-use-tcmalloc-as-the-memory-allocator.patch The name of the patch file does not reflect the updated commit title. > > diff --git a/debian/patches/pve/0048-PVE-use-tcmalloc-as-the-memory-allocator.patch b/debian/patches/pve/0048-PVE-use-tcmalloc-as-the-memory-allocator.patch > new file mode 100644 > index 0000000..f8171ae > --- /dev/null > +++ b/debian/patches/pve/0048-PVE-use-tcmalloc-as-the-memory-allocator.patch > @@ -0,0 +1,77 @@ > +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 > +From: Kefu Chai > +Date: Thu, 9 Apr 2026 17:29:10 +0800 > +Subject: [PATCH] PVE-Backup: support using tcmalloc as the memory allocator