From nobody Thu Nov 28 20:41:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1659520753; cv=none; d=zohomail.com; s=zohoarc; b=ccsxj4rvQB7Px2Hk4GH2oUt4POsuTwC11PkeHmXdVt2ozh1xPWO42LwstQxsngvZmsyk7NwjgNURNUvENsZ0wl5aL63O9jGdNmD/UyT/IedkZ84O+iUcvdywj0XeuyZQ3JbNrJLrT0XggV8NbdayrneNSZx4SzNJSAaEI+fKvUQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659520753; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=r2TvviRtiNX33JH8gt8aOmz5SDTQQb68hYBn0CV+hh0=; b=DEk4hcJWWelYlGQXTcTEALT0f4I8WL3SV5ptB+IxtpAFW+2FNB97ILBCgXWu2MFDkuqzF5WtAtDOXtlZ3osuIusA3vz/fPiO84Yhe2qEzUYqUYKFKbHr7IQyAOrweZu+QuFxA/8OxwQO/a36AwIly6BDLHu98UGsTMEU7HhFv6s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1659520753269500.4069536482243; Wed, 3 Aug 2022 02:59:13 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.379711.613416 (Exim 4.92) (envelope-from ) id 1oJB9T-0003ox-NR; Wed, 03 Aug 2022 09:58:55 +0000 Received: by outflank-mailman (output) from mailman id 379711.613416; Wed, 03 Aug 2022 09:58:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oJB9T-0003oq-I9; Wed, 03 Aug 2022 09:58:55 +0000 Received: by outflank-mailman (input) for mailman id 379711; Wed, 03 Aug 2022 09:58:54 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oJB9S-0003FP-Fa for xen-devel@lists.xenproject.org; Wed, 03 Aug 2022 09:58:54 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e159d17e-1312-11ed-924f-1f966e50362f; Wed, 03 Aug 2022 11:58:53 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D71BA1FB8E; Wed, 3 Aug 2022 09:58:52 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A92AE13AD8; Wed, 3 Aug 2022 09:58:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oNlSJtxG6mIZFwAAMHmgww (envelope-from ); Wed, 03 Aug 2022 09:58:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e159d17e-1312-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1659520732; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r2TvviRtiNX33JH8gt8aOmz5SDTQQb68hYBn0CV+hh0=; b=cJxly7c6tISEqQZTcWqfoMPKOHTb1zGbR0QqNzTRxHUKQWP7e5RgLDO++6Y9U0TYv51Cgn RUgoDv+//8NMlXXu3bGnn4FroxAOsAO+rK+hD4y9GqAONUTViD4eCey2P4FZVLyKlMhIGA O6rNV12vXKQiC9J89GSSBOZLInnBea0= Subject: [PATCH v2 1/2] xen: sched: dom0_vcpus_pin should only affect dom0 From: Dario Faggioli To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Jan Beulich , George Dunlap Date: Wed, 03 Aug 2022 11:58:52 +0200 Message-ID: <165952073210.13196.2525249635894768659.stgit@tumbleweed.Wayrath> In-Reply-To: <165952060175.13196.15449615309231718989.stgit@tumbleweed.Wayrath> References: <165952060175.13196.15449615309231718989.stgit@tumbleweed.Wayrath> User-Agent: StGit/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1659520754223100006 If dom0_vcpus_pin is used, make sure the pinning is only done for dom0 vcpus, instead of for the hardware domain (which might not be dom0 at all!). Suggested-by: Jan Beulich Signed-off-by: Dario Faggioli Reviewed-by: Jan Beulich --- Cc: George Dunlap --- Changes from v1: - check domain_id to be 0, for properly identifying dom0 Difference from "RFC" [1]: - new patch [1] https://lore.kernel.org/xen-devel/e061a647cd77a36834e2085a96a07caa785c5= 066.camel@suse.com/ --- xen/common/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index f689b55783..a066c629cb 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -575,7 +575,7 @@ int sched_init_vcpu(struct vcpu *v) * Initialize affinity settings. The idler, and potentially * domain-0 VCPUs, are pinned onto their respective physical CPUs. */ - if ( is_idle_domain(d) || (is_hardware_domain(d) && opt_dom0_vcpus_pin= ) ) + if ( is_idle_domain(d) || (d->domain_id =3D=3D 0 && opt_dom0_vcpus_pin= ) ) sched_set_affinity(unit, cpumask_of(processor), &cpumask_all); else sched_set_affinity(unit, &cpumask_all, &cpumask_all);