[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 04/28] xen/sched: remove vcpu_set_soft_affinity()


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Mon, 13 Oct 2025 18:15:16 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4Z/pSsUa3YtE1f7FvQvi+IxLN38uxBzuO8S4No8CmOs=; b=iMBEYZSITPxh2CxLCCW3IzZOUujjXqhN3tfkO4tKMuEgH0pQ3CvVcIgkiATmCc+IV+YbAIk9iiSTycpIL8166tq+PxKuqikoc9CCuDtlJpwOILwDdoYRBE987QWJ6mZTWyMUg9YU3BO3ytBfq+Zfuocm/HwBX08RZU7ANbfHIFvnEHMbmqGxTQthJ25X0uJu0x15ktXHBCYhyX1eZt4/7hK+Rwfm12nGFLsKeKmttV6+nD7/3erk0oSIF3mLN+rTd5z1c63bEYyonq7MoMwXGmcp5IKLsbxuw89gf6wOa5zScjWwU1xr2JH1XrQQFOXhmMF0mT6OEOcVqK6GUlwqWQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=r0b/THGj7JIVVp3pdxbqNFlY+oSeFNu3PiJaLahhhDPJIhKpaKmECsV54rtHUt8SlUpqn9aehqMtRIfNqQ4ds9vGGM58KZY0B0qA4AubD8DZTcG2jziIAONAWB3thu1G2U1QNiq+2CW+J8eheUxb+m4UT2gwAxYoq2yPP8IFoUKpZm5MoUPWajdm1BKanturIVNFU3b1ppZyJnkLvG2PuHd9RKn5dQfJyoBxMejX8y2Ik8MV4BIA0C5Wv8E0p8tLApRnYcSVuM///2K5m36omgTFj+qAod2/vZqQDrgrJW1nwf1M2TmV0GrSeaMpjgH2UO3iTAm+4vqjevDqAtauMw==
  • Cc: <ray.huang@xxxxxxx>, <oleksii.kurochko@xxxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, George Dunlap <gwd@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Mon, 13 Oct 2025 10:16:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Helper vcpu_set_soft_affinity() only has a single caller, so it is of little
value to keep it as a helper and could easily be expanded at the sole call
site.

Suggested-by: Jan Beulich <jbeulich@xxxxxxxx>
Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
---
v2 -> v3:
- new commit
---
 xen/common/sched/core.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index 2ab4313517..ec2448cfa1 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -1402,11 +1402,6 @@ int vcpu_set_hard_affinity(struct vcpu *v, const 
cpumask_t *affinity)
     return vcpu_set_affinity(v, affinity, v->sched_unit->cpu_hard_affinity);
 }
 
-static int vcpu_set_soft_affinity(struct vcpu *v, const cpumask_t *affinity)
-{
-    return vcpu_set_affinity(v, affinity, v->sched_unit->cpu_soft_affinity);
-}
-
 /* Block the currently-executing domain until a pertinent event occurs. */
 void vcpu_block(void)
 {
@@ -1762,8 +1757,9 @@ int vcpu_affinity_domctl(struct domain *d, uint32_t cmd,
         {
             ret = xenctl_bitmap_to_bitmap(cpumask_bits(new_affinity),
                                           &vcpuaff->cpumap_soft, nr_cpu_ids);
-            if ( !ret)
-                ret = vcpu_set_soft_affinity(v, new_affinity);
+            if ( !ret )
+                ret = vcpu_set_affinity(v, new_affinity,
+                                        v->sched_unit->cpu_soft_affinity);
             if ( ret )
             {
                 /*
-- 
2.34.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.