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

[xen staging] sched: dom0_vcpus_pin should only affect dom0



commit 01ca29f0b17a50a94b0e232ba276c32e95d80ae3
Author:     Dario Faggioli <dfaggioli@xxxxxxxx>
AuthorDate: Wed Aug 3 12:14:01 2022 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Aug 3 12:14:01 2022 +0200

    sched: dom0_vcpus_pin should only affect dom0
    
    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 <jbeulich@xxxxxxxx>
    Signed-off-by: Dario Faggioli <dfaggioli@xxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 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 == 0 && opt_dom0_vcpus_pin) )
         sched_set_affinity(unit, cpumask_of(processor), &cpumask_all);
     else
         sched_set_affinity(unit, &cpumask_all, &cpumask_all);
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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