xend: Remove broken bits of NUMA code.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 1 Jun 2010 05:55:23 +0000 (06:55 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 1 Jun 2010 05:55:23 +0000 (06:55 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/python/xen/xend/XendCheckpoint.py
tools/python/xen/xend/balloon.py

index 50d671a1e9b7086f2bbcdc993138fc6161ea7f79..1cb1cab1b7e95ac0c1b85cc4ba18d60aa4e67d4b 100644 (file)
@@ -239,21 +239,6 @@ def restore(xd, fd, dominfo = None, paused = False, relocating = False):
         dominfo.destroy()
         raise XendError("cannot restore non-migratable domain")
 
-    # repin domain vcpus if a target node number was specified 
-    # this is done prior to memory allocation to aide in memory
-    # distribution for NUMA systems.
-    nodenr = -1
-    for i,l in enumerate(vmconfig):
-        if type(l) == type([]):
-            if l[0] == 'node':
-                nodenr = int(l[1])
-
-    if nodenr >= 0:
-        node_to_cpu = XendNode.instance().xc.physinfo()['node_to_cpu']
-        if nodenr < len(node_to_cpu):
-            for v in range(0, dominfo.info['VCPUs_max']):
-                 xc.vcpu_setaffinity(dominfo.domid, v, node_to_cpu[nodenr])
-
     store_port   = dominfo.getStorePort()
     console_port = dominfo.getConsolePort()
 
index 500ee091c4ff918437954f9e2c195cbb7c3ad2f0..89965d71b90419e5555fc2716083cec22010361d 100644 (file)
@@ -174,35 +174,6 @@ def free(need_mem, dominfo):
             free_mem = physinfo['free_memory']
             scrub_mem = physinfo['scrub_memory']
 
-        # Check whethercurrent machine is a numa system and the new 
-        # created hvm has all its vcpus in the same node, if all the 
-        # conditions above are fit. We will wait until all the pages 
-        # in scrub list are freed (if waiting time go beyond 20s, 
-        # we will stop waiting it.)
-        if physinfo['nr_nodes'] > 1 and retries == 0:
-            oldnode = -1
-            waitscrub = 1
-            vcpus = dominfo.info['cpus'][0]
-            for vcpu in vcpus:
-                nodenum = xc.numainfo()['cpu_to_node'][cpu]
-                if oldnode == -1:
-                    oldnode = nodenum
-                elif oldnode != nodenum:
-                    waitscrub = 0
-
-            if waitscrub == 1 and scrub_mem > 0:
-                log.debug("wait for scrub %s", scrub_mem)
-                while scrub_mem > 0 and retries < rlimit:
-                    time.sleep(sleep_time)
-                    physinfo = xc.physinfo()
-                    free_mem = physinfo['free_memory']
-                    scrub_mem = physinfo['scrub_memory']
-                    retries += 1
-                    sleep_time += SLEEP_TIME_GROWTH
-                log.debug("scrub for %d times", retries)
-
-            retries = 0
-            sleep_time = SLEEP_TIME_GROWTH
         while retries < rlimit:
             physinfo = xc.physinfo()
             free_mem = physinfo['free_memory']