debuggers.hg

changeset 21273:3235ef7a839f

cpupools: optimise domain creation if pool movement is a no-op

Signed-off by: Juergen Gross <juergen.gross@ts.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Apr 23 08:38:35 2010 +0100 (2010-04-23)
parents 7f3eff15050c
children 49e3aa844902
files xen/common/cpupool.c
line diff
     1.1 --- a/xen/common/cpupool.c	Fri Apr 23 08:37:19 2010 +0100
     1.2 +++ b/xen/common/cpupool.c	Fri Apr 23 08:38:35 2010 +0100
     1.3 @@ -520,6 +520,12 @@ addcpu_out:
     1.4              rcu_unlock_domain(d);
     1.5              break;
     1.6          }
     1.7 +        if ( op->cpupool_id == d->cpupool->cpupool_id )
     1.8 +        {
     1.9 +            ret = 0;
    1.10 +            rcu_unlock_domain(d);
    1.11 +            break;
    1.12 +        }
    1.13          printk(XENLOG_DEBUG "cpupool move_domain(dom=%d)->pool=%d\n",
    1.14              d->domain_id, op->cpupool_id);
    1.15          ret = -ENOENT;