From: "Yang, Xiaowei" <xiaowei.yang@intel.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH] Fix domheap structure allocation when NUMA=on
Date: Fri, 20 Mar 2009 13:05:23 +0800 [thread overview]
Message-ID: <49C32413.2030505@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 193 bytes --]
DIRECTMAP_VIRT_END can't be passed to virt_to_mfn(), as it's just beyond
direct map boundary and triggers ASSERT very early at boot time.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
[-- Attachment #2: numa.patch --]
[-- Type: text/x-patch, Size: 1130 bytes --]
diff -r 78ed606cb1ab xen/common/page_alloc.c
--- a/xen/common/page_alloc.c Thu Mar 19 10:57:23 2009 +0800
+++ b/xen/common/page_alloc.c Thu Mar 19 23:01:32 2009 +0800
@@ -293,7 +297,7 @@ static unsigned long init_node_heap(int
}
#ifdef DIRECTMAP_VIRT_END
else if ( nr >= needed &&
- mfn + needed <= virt_to_mfn(DIRECTMAP_VIRT_END) )
+ mfn + needed <= virt_to_mfn(DIRECTMAP_VIRT_END - PAGE_SIZE) )
{
_heap[node] = mfn_to_virt(mfn);
avail[node] = mfn_to_virt(mfn + needed) - sizeof(**avail) * NR_ZONES;
diff -r 78ed606cb1ab xen/include/asm-x86/x86_64/page.h
--- a/xen/include/asm-x86/x86_64/page.h Thu Mar 19 10:57:23 2009 +0800
+++ b/xen/include/asm-x86/x86_64/page.h Thu Mar 19 23:00:26 2009 +0800
@@ -40,7 +40,7 @@ static inline unsigned long __virt_to_ma
ASSERT(va >= XEN_VIRT_START);
ASSERT(va < DIRECTMAP_VIRT_END);
ASSERT((va < XEN_VIRT_END) || (va >= DIRECTMAP_VIRT_START));
- if ( va > DIRECTMAP_VIRT_START )
+ if ( va >= DIRECTMAP_VIRT_START )
return va - DIRECTMAP_VIRT_START;
return va - XEN_VIRT_START + xen_phys_start;
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2009-03-20 5:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 5:05 Yang, Xiaowei [this message]
2009-03-20 8:15 ` [PATCH] Fix domheap structure allocation when NUMA=on Jan Beulich
2009-03-20 8:34 ` Yang, Xiaowei
2009-03-20 8:47 ` Jan Beulich
2009-03-20 8:56 ` Keir Fraser
2009-03-20 9:27 ` Jan Beulich
2009-03-20 9:32 ` Keir Fraser
2009-03-24 10:48 ` Yang, Xiaowei
2009-03-24 10:55 ` Jan Beulich
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=49C32413.2030505@intel.com \
--to=xiaowei.yang@intel.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.