From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>,
Dario Faggioli <dario.faggioli@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH for-4.6 v3 3/3] libxc: fix vNUMA memory allocation
Date: Mon, 17 Aug 2015 19:57:01 +0100 [thread overview]
Message-ID: <1439837821-8930-4-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1439837821-8930-1-git-send-email-wei.liu2@citrix.com>
Only 4KB allocation was using new_memflags. We should use new_memflags
in for 2MB and 1GB allocation as well because that variable contains
node information.
Without this patch, when creating a HVM guest with vNUMA, because the
node information was not present in the flags passed to libxc, actual
memory allocation didn't comply with what user specified. With this
patch the behaviour is correct.
Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
---
v3: better commit message
---
tools/libxc/xc_hvm_build_x86.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/libxc/xc_hvm_build_x86.c b/tools/libxc/xc_hvm_build_x86.c
index ec11f15..ea250dd 100644
--- a/tools/libxc/xc_hvm_build_x86.c
+++ b/tools/libxc/xc_hvm_build_x86.c
@@ -486,7 +486,8 @@ static int setup_guest(xc_interface *xch,
done = xc_domain_populate_physmap(xch, dom, nr_extents,
SUPERPAGE_1GB_SHIFT,
- memflags, sp_extents);
+ new_memflags,
+ sp_extents);
if ( done > 0 )
{
@@ -526,7 +527,8 @@ static int setup_guest(xc_interface *xch,
done = xc_domain_populate_physmap(xch, dom, nr_extents,
SUPERPAGE_2MB_SHIFT,
- memflags, sp_extents);
+ new_memflags,
+ sp_extents);
if ( done > 0 )
{
--
2.1.4
next prev parent reply other threads:[~2015-08-17 18:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-17 18:56 [PATCH for-4.6 v3 0/3] More vNUMA fixes Wei Liu
2015-08-17 18:56 ` [PATCH for-4.6 v3 1/3] xl: fix vNUMA vdistance parsing Wei Liu
2015-08-20 9:04 ` Ian Campbell
2015-08-17 18:57 ` [PATCH for-4.6 v3 2/3] xl: error out if vNUMA specifies more vcpus than pcpus Wei Liu
2015-08-20 9:47 ` Ian Campbell
2015-08-17 18:57 ` Wei Liu [this message]
2015-08-20 9:47 ` [PATCH for-4.6 v3 3/3] libxc: fix vNUMA memory allocation Ian Campbell
2015-08-21 8:07 ` [PATCH for-4.6 v3 0/3] More vNUMA fixes Ian Campbell
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=1439837821-8930-4-git-send-email-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).