ia64/xen-unstable

changeset 17988:5eaec8296a22

Set default domain_to_node() allocation preference before dropping
domain reference when calling alloc_domheap_pages().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sun Jul 06 20:16:24 2008 +0100 (2008-07-06)
parents 8606ff75779f
children abd84464c09c
files xen/common/memory.c
line diff
     1.1 --- a/xen/common/memory.c	Sun Jul 06 17:22:58 2008 +0100
     1.2 +++ b/xen/common/memory.c	Sun Jul 06 20:16:24 2008 +0100
     1.3 @@ -287,7 +287,7 @@ static long memory_exchange(XEN_GUEST_HA
     1.4      unsigned long in_chunk_order, out_chunk_order;
     1.5      xen_pfn_t     gpfn, gmfn, mfn;
     1.6      unsigned long i, j, k;
     1.7 -    unsigned int  memflags = 0;
     1.8 +    unsigned int  node, memflags = 0;
     1.9      long          rc = 0;
    1.10      struct domain *d;
    1.11      struct page_info *page;
    1.12 @@ -344,7 +344,10 @@ static long memory_exchange(XEN_GUEST_HA
    1.13          d,
    1.14          XENMEMF_get_address_bits(exch.out.mem_flags) ? :
    1.15          (BITS_PER_LONG+PAGE_SHIFT)));
    1.16 -    memflags |= MEMF_node(XENMEMF_get_node(exch.out.mem_flags));
    1.17 +    node = XENMEMF_get_node(exch.out.mem_flags);
    1.18 +    if ( node == NUMA_NO_NODE )
    1.19 +        node = domain_to_node(d);
    1.20 +    memflags |= MEMF_node(node);
    1.21  
    1.22      for ( i = (exch.nr_exchanged >> in_chunk_order);
    1.23            i < (exch.in.nr_extents >> in_chunk_order);