xend: Remove broken bits of NUMA code.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2010-06-01 06:55:23 +01:00
1 parent eddde6561c
commit 0b086b2583
2 files changed
-44

No files matched your search

-15
View 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()
-29
View 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']
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.