All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 1/4] hvm: NUMA guest: extend memops hypercall
Date: Sat, 5 Jul 2008 01:12:31 +0200	[thread overview]
Message-ID: <486EAE5F.6000207@amd.com> (raw)
In-Reply-To: <C494018A.2397A%keir.fraser@eu.citrix.com>

[-- Attachment #1: Type: text/plain, Size: 1907 bytes --]

Keir Fraser wrote:
> On 4/7/08 16:28, "Andre Przywara" <andre.przywara@amd.com> wrote:
> 
>> Have you applied the patches correctly? From 02_numa_guest.patch:
>> @@ -115,7 +113,7 @@
>>               goto out;
>>
>>           page = alloc_domheap_pages(
>> -            d, a->extent_order, a->memflags | MEMF_node(node));
>> +            d, a->extent_order, a->memflags);
>>           if ( unlikely(page == NULL) )
>>           {
>>               gdprintk(XENLOG_INFO, "Could not allocate order=%d extent:"
>>
>> The other use of MEMF_node is in exchange_memory, which is not given any
>> NUMA node info from the caller, so this is correct.
> 
> When sent a patch sequence I expect the patches to apply and work
> independently (when applied one-by-one in order).
IMHO that is what they do (beside the below issue patch 1 and 2 are more 
or less refactoring without functional changes), but anyway...

> Anyway, your second patch changes the default NUMA allocation policy from
> allocate on home node for the domain to allocate on node I'm currently
> executing on. That would seem a net loss for PV guests (whose builder will
> not be explicitly specifying the numa node for allocations).
Right you are, I have missed the subtle difference between both (the 
code isn't as clear as your sentence). The below patch should fix this 
(by catching NUMA_NO_NODE while still knowing struct domain*).
If there are no further issues, I will resend the patches.

Regards,
Andre.

-- 
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 277-84917
----to satisfy European Law for business letters:
AMD Saxony Limited Liability Company & Co. KG,
Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Register Court Dresden: HRA 4896, General Partner authorized
to represent: AMD Saxony LLC (Wilmington, Delaware, US)
General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy

[-- Attachment #2: 02a_numa_guest.patch --]
[-- Type: text/plain, Size: 455 bytes --]

diff -r a3d712538f1b xen/common/page_alloc.c
--- a/xen/common/page_alloc.c	Fri Jul 04 15:57:01 2008 +0200
+++ b/xen/common/page_alloc.c	Sat Jul 05 01:09:48 2008 +0200
@@ -792,6 +792,8 @@ struct page_info *alloc_domheap_pages(
 
     ASSERT(!in_irq());
 
+    if ( node == NUMA_NO_NODE ) node = domain_to_node (d);
+
     bits = domain_clamp_alloc_bitsize(d, bits ? : (BITS_PER_LONG+PAGE_SHIFT));
     if ( bits <= (PAGE_SHIFT + 1) )
         return NULL;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

      reply	other threads:[~2008-07-04 23:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-04  7:57 [PATCH 1/4] hvm: NUMA guest: extend memops hypercall Andre Przywara
2008-07-04  9:52 ` Keir Fraser
2008-07-04 11:14   ` Andre Przywara
2008-07-04 11:59     ` Keir Fraser
2008-07-04 12:48       ` Andre Przywara
2008-07-04 14:54         ` Keir Fraser
2008-07-04 15:28           ` Andre Przywara
2008-07-04 15:34             ` Keir Fraser
2008-07-04 23:12               ` Andre Przywara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=486EAE5F.6000207@amd.com \
    --to=andre.przywara@amd.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.