From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 35F091FF0DF for ; Thu, 19 Nov 2026 11:07:58 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id C3897216E3; Thu, 19 Nov 2026 11:07:51 +0100 (CET) Message-ID: <7e237b26-942c-45ba-84bf-4f2d8b5d1648@proxmox.com> Date: Thu, 19 Nov 2026 11:07:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH qemu-server v4 4/4] cpu: add cpu binding To: Elias Huhsovitz , pve-devel@lists.proxmox.com References: <20261111152027.260117-1-e.huhsovitz@proxmox.com> <20261111152027.260117-5-e.huhsovitz@proxmox.com> <0c1ed99f-7379-4cb9-94f9-1b564b78242a@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795082868283 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.276 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: 3PVXJ6AHG3M4W76P7SZDRVUY5UQVZFMP X-Message-ID-Hash: 3PVXJ6AHG3M4W76P7SZDRVUY5UQVZFMP X-MailFrom: d.csapak@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 11/19/26 10:35 AM, Elias Huhsovitz wrote: >>> eval { >>> # With -blockdev, it is necessary to activate the volumes before generating the command line >>> # Plugins can safely deactivate already-active volumes here if needed >>> @@ -5539,10 +5548,21 @@ sub vm_start_nolock { >>> }, >>> ); >>> >>> + if ($conf->{'cpu-binding-mode'}) { >>> + $vcpu_binding_map = PVE::QemuServer::CPUBind::conf_to_vcpu_bindings($conf); >> ... but here int he crate we don't do any cpu pinning >> >> we could also always do it in the crate >> >> then the taskset call would vanish here. >> >> we'd have to do >> >> my $binding = parse_cpu_binding($conf-{'pcu- >> > I am not quite sure what is meant by this. > > Do you mean that we simply hand all affinity related logic to the code > responsible for the cpu pinning logic? yes, this. affinity only influences this one taskset call, so having one place where we set this makes sense imo > > Or do you mean that we should init qemu using taskset anyways and then > later set the affinity of the vcpus again when it is time to pin? > Since I chose to freeze the vm on startup, until pinning is applied, I > figured the original taskset to be redundant.