From: Dario Faggioli Date: Wed, 3 Aug 2016 12:31:49 +0000 (+0100) Subject: xen: cpupool: small optimization when moving between pools X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~635 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f6bde162c4165f7e83f9618cc13dc3aa2af4b6dd;p=xen.git xen: cpupool: small optimization when moving between pools If the domain is already where we want it to go, there's not much to do indeed. Signed-off-by: Dario Faggioli Reviewed-by: Juergen Gross --- diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c index 5dacc612d1..999839444e 100644 --- a/xen/common/cpupool.c +++ b/xen/common/cpupool.c @@ -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 )