]> xenbits.xensource.com Git - xen.git/commitdiff
xen: cpupool: small optimization when moving between pools
authorDario Faggioli <dario.faggioli@citrix.com>
Wed, 3 Aug 2016 12:31:49 +0000 (13:31 +0100)
committerGeorge Dunlap <george.dunlap@citrix.com>
Wed, 3 Aug 2016 13:14:08 +0000 (14:14 +0100)
If the domain is already where we want it to go,
there's not much to do indeed.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
xen/common/cpupool.c

index 5dacc612d10cc100c1c141cf193ee1f82abb09a2..999839444e9b14f0b00a50bd4c1b35266661d4e3 100644 (file)
@@ -232,6 +232,9 @@ static int cpupool_move_domain_locked(struct domain *d, struct cpupool *c)
 {
     int ret;
 
+    if ( unlikely(d->cpupool == c) )
+        return 0;
+
     d->cpupool->n_dom--;
     ret = sched_move_domain(d, c);
     if ( ret )