|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/mm: pod: use the correct memory flags for alloc_domheap_page{, s}
commit 69176a4b9c27796bb4cde1e13f28f5eace425400
Author: Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Mon Oct 26 13:58:35 2015 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Oct 26 13:58:35 2015 +0100
x86/mm: pod: use the correct memory flags for alloc_domheap_page{,s}
The last parameter of alloc_domheap_page{s,} contain the memory flags and
not the order of the allocation.
Use 0 for the call in p2m_pod_set_cache_target as it was before
1069d63c5ef2510d08b83b2171af660e5bb18c63 "x86/mm/p2m: use defines for
page sizes". Note that PAGE_ORDER_4K is also equal to 0 so the behavior
stays the same.
For the call in p2m_pod_offline_or_broken_replace we want to allocate
the new page on the same numa node as the previous page. So retrieve the
numa node and pass it in the memory flags.
Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
Tested-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>
---
xen/arch/x86/mm/p2m-pod.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index 901da37..acd85ea 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -222,7 +222,7 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned
long pod_target, int p
else
order = PAGE_ORDER_4K;
retry:
- page = alloc_domheap_pages(d, order, PAGE_ORDER_4K);
+ page = alloc_domheap_pages(d, order, 0);
if ( unlikely(page == NULL) )
{
if ( order == PAGE_ORDER_2M )
@@ -471,13 +471,14 @@ p2m_pod_offline_or_broken_replace(struct page_info *p)
{
struct domain *d;
struct p2m_domain *p2m;
+ nodeid_t node = phys_to_nid(page_to_maddr(p));
if ( !(d = page_get_owner(p)) || !(p2m = p2m_get_hostp2m(d)) )
return;
free_domheap_page(p);
- p = alloc_domheap_page(d, PAGE_ORDER_4K);
+ p = alloc_domheap_page(d, MEMF_node(node));
if ( unlikely(!p) )
return;
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |