All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 00/21] Virtual NUMA for PV and HVM
@ 2015-03-09 12:51 Wei Liu
  2015-03-09 12:51 ` [PATCH v7 01/21] xen: make two memory hypercalls vNUMA-aware Wei Liu
                   ` (20 more replies)
  0 siblings, 21 replies; 39+ messages in thread
From: Wei Liu @ 2015-03-09 12:51 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu

Hi all

This is version 7 of this series rebased on top of master.

This patch series implements virtual NUMA support for both PV and HVM guest.
That is, admin can configure via libxl what virtual NUMA topology the guest
sees.

This is the stage 1 (basic vNUMA support) and part of stage 2 (vNUMA-ware
ballooning, hypervisor side) described in my previous email to xen-devel [0].

This series is broken into several parts:

1. xen patches: vNUMA debug output and vNUMA-aware memory hypercall support.
2. libxc/libxl support for PV vNUMA.
3. libxc/libxl/hypervisor support for HVM vNUMA.
4. xl vNUMA configuration documentation and parser.

One significant difference from Elena's work is that this patch series makes
use of multiple vmemranges should there be a memory hole, instead of shrinking
ram. This matches the behaviour of real hardware.

The vNUMA auto placement algorithm is missing at the moment and Dario is
working on it.

This series can be found at:
 git://xenbits.xen.org/people/liuw/xen.git wip.vnuma-v5

With this series, the following configuration can be used to enabled virtual
NUMA support, and it works for both PV and HVM guests.

vnuma = [ [ "pnode=0","size=3000","vcpus=0-3","vdistances=10,20"  ],
          [ "pnode=0","size=3000","vcpus=4-7","vdistances=20,10"  ],
        ]

For example output of guest NUMA information, please look at [1].

In terms of libxl / libxc internal, things are broken into several
parts:

1. libxl interface

Users of libxl can only specify how many vnodes a guest can have, but
currently they have no control over the actual memory layout. Note that
it's fairly easy to export the interface to control memory layout in the
future.

2. libxl internal

It generates some internal vNUMA configurations when building domain,
then transform them into libxc representations. It also validates vNUMA
configuration along the line.

3. libxc internal

Libxc does what it's told to do. It doesn't do anything smart (in fact,
I delibrately didn't put any smart logic inside it). Libxc will also
report back some information in HVM case to libxl but that's it.

Wei.

[0] <20141111173606.GC21312@zion.uk.xensource.com>
[1] <1416582421-10789-1-git-send-email-wei.liu2@citrix.com>

Patches marked with "A" have already been acked. Hypervisor side patch and
toolstack side patches can be applied independently.

Wei Liu (21):
    xen: make two memory hypercalls vNUMA-aware

    libxc: duplicate snippet to allocate p2m_host array
 A  libxc: add p2m_size to xc_dom_image
 A  libxc: allocate memory with vNUMA information for PV guest
 A  libxl: introduce vNUMA types
 A  libxl: add vmemrange to libxl__domain_build_state
 A  libxl: introduce libxl__vnuma_config_check
 A  libxl: x86: factor out e820_host_sanitize
 A  libxl: functions to build vmemranges for PV guest
 A  libxl: build, check and pass vNUMA info to Xen for PV guest
 A  libxc: indentation change to xc_hvm_build_x86.c
 A  libxc: allocate memory with vNUMA information for HVM guest
 A  libxl: build, check and pass vNUMA info to Xen for HVM guest
 A  libxl: disallow memory relocation when vNUMA is enabled
    libxl: define LIBXL_HAVE_VNUMA

 A  libxlu: rework internal representation of setting
 A  libxlu: nested list support
    libxlu: record location when parsing values
 A  libxlu: introduce new APIs
 A  xl: introduce xcalloc
    xl: vNUMA support

 docs/man/xl.cfg.pod.5          |  59 +++++++++-
 tools/libxc/include/xc_dom.h   |  13 ++-
 tools/libxc/include/xenguest.h |  13 +++
 tools/libxc/xc_dom_arm.c       |   1 +
 tools/libxc/xc_dom_core.c      |   8 +-
 tools/libxc/xc_dom_x86.c       | 129 +++++++++++++++++----
 tools/libxc/xc_hvm_build_x86.c | 237 +++++++++++++++++++++++++-------------
 tools/libxl/Makefile           |   2 +-
 tools/libxl/libxl.h            |   7 ++
 tools/libxl/libxl_arch.h       |   6 +
 tools/libxl/libxl_arm.c        |   8 ++
 tools/libxl/libxl_create.c     |   9 ++
 tools/libxl/libxl_dm.c         |   6 +-
 tools/libxl/libxl_dom.c        | 120 ++++++++++++++++++++
 tools/libxl/libxl_internal.h   |  24 ++++
 tools/libxl/libxl_types.idl    |  10 ++
 tools/libxl/libxl_vnuma.c      | 252 +++++++++++++++++++++++++++++++++++++++++
 tools/libxl/libxl_x86.c        | 110 ++++++++++++++++--
 tools/libxl/libxlu_cfg.c       | 211 +++++++++++++++++++++++++---------
 tools/libxl/libxlu_cfg_i.h     |  14 ++-
 tools/libxl/libxlu_cfg_y.c     |  46 ++++----
 tools/libxl/libxlu_cfg_y.h     |   2 +-
 tools/libxl/libxlu_cfg_y.y     |  14 +--
 tools/libxl/libxlu_internal.h  |  25 +++-
 tools/libxl/libxlutil.h        |  13 +++
 tools/libxl/xl_cmdimpl.c       | 168 ++++++++++++++++++++++++++-
 xen/common/kernel.c            |   2 +-
 xen/common/memory.c            |  55 +++++++--
 xen/include/public/features.h  |   3 +
 xen/include/public/memory.h    |   2 +
 30 files changed, 1341 insertions(+), 228 deletions(-)
 create mode 100644 tools/libxl/libxl_vnuma.c

-- 
1.9.1

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2015-03-12 13:37 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-09 12:51 [PATCH v7 00/21] Virtual NUMA for PV and HVM Wei Liu
2015-03-09 12:51 ` [PATCH v7 01/21] xen: make two memory hypercalls vNUMA-aware Wei Liu
2015-03-09 13:22   ` Jan Beulich
2015-03-09 13:29     ` Wei Liu
2015-03-09 13:52       ` Jan Beulich
2015-03-09 13:59         ` Wei Liu
2015-03-09 12:51 ` [PATCH v7 02/21] libxc: duplicate snippet to allocate p2m_host array Wei Liu
2015-03-09 15:06   ` Konrad Rzeszutek Wilk
2015-03-11 15:02   ` Ian Campbell
2015-03-09 12:51 ` [PATCH v7 03/21] libxc: add p2m_size to xc_dom_image Wei Liu
2015-03-09 12:51 ` [PATCH v7 04/21] libxc: allocate memory with vNUMA information for PV guest Wei Liu
2015-03-09 12:51 ` [PATCH v7 05/21] libxl: introduce vNUMA types Wei Liu
2015-03-09 12:51 ` [PATCH v7 06/21] libxl: add vmemrange to libxl__domain_build_state Wei Liu
2015-03-09 12:51 ` [PATCH v7 07/21] libxl: introduce libxl__vnuma_config_check Wei Liu
2015-03-09 12:51 ` [PATCH v7 08/21] libxl: x86: factor out e820_host_sanitize Wei Liu
2015-03-09 12:51 ` [PATCH v7 09/21] libxl: functions to build vmemranges for PV guest Wei Liu
2015-03-09 12:51 ` [PATCH v7 10/21] libxl: build, check and pass vNUMA info to Xen " Wei Liu
2015-03-09 12:51 ` [PATCH v7 11/21] libxc: indentation change to xc_hvm_build_x86.c Wei Liu
2015-03-09 12:51 ` [PATCH v7 12/21] libxc: allocate memory with vNUMA information for HVM guest Wei Liu
2015-03-09 12:51 ` [PATCH v7 13/21] libxl: build, check and pass vNUMA info to Xen " Wei Liu
2015-03-09 12:51 ` [PATCH v7 14/21] libxl: disallow memory relocation when vNUMA is enabled Wei Liu
2015-03-09 12:51 ` [PATCH v7 15/21] libxl: define LIBXL_HAVE_VNUMA Wei Liu
2015-03-11 15:03   ` Ian Campbell
2015-03-09 12:51 ` [PATCH v7 16/21] libxlu: rework internal representation of setting Wei Liu
2015-03-09 12:51 ` [PATCH v7 17/21] libxlu: nested list support Wei Liu
2015-03-09 12:51 ` [PATCH v7 18/21] libxlu: record location when parsing values Wei Liu
2015-03-11 15:12   ` Ian Campbell
2015-03-11 15:16     ` Wei Liu
2015-03-11 15:36       ` Ian Campbell
2015-03-09 12:51 ` [PATCH v7 19/21] libxlu: introduce new APIs Wei Liu
2015-03-09 12:51 ` [PATCH v7 20/21] xl: introduce xcalloc Wei Liu
2015-03-09 12:51 ` [PATCH v7 21/21] xl: vNUMA support Wei Liu
2015-03-11 15:12   ` Ian Campbell
2015-03-11 20:14     ` Wei Liu
2015-03-12 10:00       ` Ian Campbell
2015-03-12 10:50         ` Wei Liu
2015-03-12 10:58           ` Ian Campbell
2015-03-12 13:22       ` Dario Faggioli
2015-03-12 13:37         ` Wei Liu

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.