All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/21] Virtual NUMA for PV and HVM
@ 2015-01-23 11:13 Wei Liu
  2015-01-23 11:13 ` [PATCH v4 01/21] xen: dump vNUMA information with debug key "u" Wei Liu
                   ` (20 more replies)
  0 siblings, 21 replies; 64+ messages in thread
From: Wei Liu @ 2015-01-23 11:13 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, ian.campbell, andrew.cooper3, dario.faggioli,
	ian.jackson, JBeulich, ufimtseva

Hi all

This is version 4 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-v4

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

memory = 6000
vnuma_memory = [3000, 3000]
vnuma_vcpu_map = [0, 1]
vnuma_pnode_map = [0, 0]
vnuma_vdistances = [ [10,30], [30,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>

Changes in v4:
1. Address comments from many people.
2. Break down the libxlu patch into three.
3. Use dedicate patches for non-functional changes.

Changes in v3:
1. Address comments made by Jan.
2. More commit messages and comments.
3. Shorten some error messages.

Changes in v2:
1. Make vnuma_vdistances mandatory.
2. Use nested list to specify distances among nodes.
3. Hvmloader uses hypercall to retrieve vNUMA information.
4. Fix some problems spotted by Jan.


Wei Liu (21):
  xen: dump vNUMA information with debug key "u"
  xen: make two memory hypercalls vNUMA-aware
  libxc: allocate memory with vNUMA information for PV guest
  libxl: introduce vNUMA types
  libxl: add vmemrange to libxl__domain_build_state
  libxl: introduce libxl__vnuma_config_check
  libxl: x86: factor out e820_host_sanitize
  libxl: functions to build vmemranges for PV guest
  libxl: build, check and pass vNUMA info to Xen for PV guest
  xen: handle XENMEM_get_vnumainfo in compat_memory_op
  hvmloader: retrieve vNUMA information from hypervisor
  hvmloader: construct SRAT
  hvmloader: construct SLIT
  libxc: indentation change to xc_hvm_build_x86.c
  libxc: allocate memory with vNUMA information for HVM guest
  libxl: build, check and pass vNUMA info to Xen for HVM guest
  libxl: disallow memory relocation when vNUMA is enabled
  libxlu: rework internal representation of setting
  libxlu: nested list support
  libxlu: introduce new APIs
  xl: vNUMA support

 docs/man/xl.cfg.pod.5                   |   39 ++++++
 tools/firmware/hvmloader/Makefile       |    2 +-
 tools/firmware/hvmloader/acpi/acpi2_0.h |   61 ++++++++
 tools/firmware/hvmloader/acpi/build.c   |  110 +++++++++++++++
 tools/firmware/hvmloader/hvmloader.c    |    3 +
 tools/firmware/hvmloader/vnuma.c        |   96 +++++++++++++
 tools/firmware/hvmloader/vnuma.h        |   52 +++++++
 tools/libxc/include/xc_dom.h            |    6 +
 tools/libxc/include/xenguest.h          |   15 ++
 tools/libxc/xc_dom_x86.c                |   85 ++++++++++--
 tools/libxc/xc_hvm_build_x86.c          |  229 ++++++++++++++++++++-----------
 tools/libxc/xc_private.h                |    2 +
 tools/libxl/Makefile                    |    2 +-
 tools/libxl/libxl_arch.h                |    6 +
 tools/libxl/libxl_arm.c                 |    9 ++
 tools/libxl/libxl_create.c              |    9 ++
 tools/libxl/libxl_dm.c                  |    6 +-
 tools/libxl/libxl_dom.c                 |   96 +++++++++++++
 tools/libxl/libxl_internal.h            |   18 +++
 tools/libxl/libxl_types.idl             |    9 ++
 tools/libxl/libxl_vnuma.c               |  227 ++++++++++++++++++++++++++++++
 tools/libxl/libxl_x86.c                 |  108 +++++++++++++--
 tools/libxl/libxlu_cfg.c                |  175 ++++++++++++++++-------
 tools/libxl/libxlu_cfg_i.h              |   13 +-
 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           |   22 ++-
 tools/libxl/libxlutil.h                 |   11 ++
 tools/libxl/xl_cmdimpl.c                |  147 ++++++++++++++++++++
 xen/arch/x86/numa.c                     |   69 +++++++++-
 xen/common/compat/memory.c              |   48 +++++++
 xen/common/kernel.c                     |    2 +-
 xen/common/memory.c                     |   58 +++++++-
 xen/include/public/features.h           |    3 +
 xen/include/public/memory.h             |    2 +
 xen/include/xlat.lst                    |    2 +
 37 files changed, 1601 insertions(+), 203 deletions(-)
 create mode 100644 tools/firmware/hvmloader/vnuma.c
 create mode 100644 tools/firmware/hvmloader/vnuma.h
 create mode 100644 tools/libxl/libxl_vnuma.c

-- 
1.7.10.4

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

end of thread, other threads:[~2015-02-24 16:15 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 11:13 [PATCH v4 00/21] Virtual NUMA for PV and HVM Wei Liu
2015-01-23 11:13 ` [PATCH v4 01/21] xen: dump vNUMA information with debug key "u" Wei Liu
2015-01-23 13:03   ` Jan Beulich
2015-01-23 13:23     ` Wei Liu
2015-01-23 11:13 ` [PATCH v4 02/21] xen: make two memory hypercalls vNUMA-aware Wei Liu
2015-01-23 13:16   ` Jan Beulich
2015-01-23 14:46     ` Wei Liu
2015-01-23 15:37       ` Jan Beulich
2015-01-23 15:43         ` Wei Liu
2015-01-23 16:06           ` Wei Liu
2015-01-23 16:17             ` Jan Beulich
2015-01-23 11:13 ` [PATCH v4 03/21] libxc: allocate memory with vNUMA information for PV guest Wei Liu
2015-01-28 16:02   ` Ian Campbell
2015-01-23 11:13 ` [PATCH v4 04/21] libxl: introduce vNUMA types Wei Liu
2015-01-28 16:04   ` Ian Campbell
2015-01-28 21:51     ` Wei Liu
2015-01-23 11:13 ` [PATCH v4 05/21] libxl: add vmemrange to libxl__domain_build_state Wei Liu
2015-01-28 16:05   ` Ian Campbell
2015-01-23 11:13 ` [PATCH v4 06/21] libxl: introduce libxl__vnuma_config_check Wei Liu
2015-01-28 16:13   ` Ian Campbell
2015-01-28 21:51     ` Wei Liu
2015-01-29 11:04       ` Ian Campbell
2015-01-29 16:01         ` Wei Liu
2015-01-23 11:13 ` [PATCH v4 07/21] libxl: x86: factor out e820_host_sanitize Wei Liu
2015-01-28 16:14   ` Ian Campbell
2015-01-23 11:13 ` [PATCH v4 08/21] libxl: functions to build vmemranges for PV guest Wei Liu
2015-01-28 16:27   ` Ian Campbell
2015-01-28 21:59     ` Wei Liu
2015-01-23 11:13 ` [PATCH v4 09/21] libxl: build, check and pass vNUMA info to Xen " Wei Liu
2015-01-28 16:29   ` Ian Campbell
2015-01-23 11:13 ` [PATCH v4 10/21] xen: handle XENMEM_get_vnumainfo in compat_memory_op Wei Liu
2015-01-23 11:13 ` [PATCH v4 11/21] hvmloader: retrieve vNUMA information from hypervisor Wei Liu
2015-01-23 13:27   ` Jan Beulich
2015-01-23 14:17     ` Wei Liu
2015-01-23 11:13 ` [PATCH v4 12/21] hvmloader: construct SRAT Wei Liu
2015-01-23 11:13 ` [PATCH v4 13/21] hvmloader: construct SLIT Wei Liu
2015-01-23 11:13 ` [PATCH v4 14/21] libxc: indentation change to xc_hvm_build_x86.c Wei Liu
2015-01-28 16:30   ` Ian Campbell
2015-01-23 11:13 ` [PATCH v4 15/21] libxc: allocate memory with vNUMA information for HVM guest Wei Liu
2015-01-28 16:36   ` Ian Campbell
2015-01-28 22:07     ` Wei Liu
2015-01-23 11:13 ` [PATCH v4 16/21] libxl: build, check and pass vNUMA info to Xen " Wei Liu
2015-01-28 16:41   ` Ian Campbell
2015-01-28 22:14     ` Wei Liu
2015-01-23 11:13 ` [PATCH v4 17/21] libxl: disallow memory relocation when vNUMA is enabled Wei Liu
2015-01-28 16:41   ` Ian Campbell
2015-01-28 22:22     ` Wei Liu
2015-01-29 11:06       ` Ian Campbell
2015-01-29 16:04         ` Wei Liu
2015-01-23 11:13 ` [PATCH v4 18/21] libxlu: rework internal representation of setting Wei Liu
2015-01-28 16:41   ` Ian Campbell
2015-02-11 16:12   ` Ian Jackson
2015-02-12 10:58     ` Wei Liu
2015-01-23 11:13 ` [PATCH v4 19/21] libxlu: nested list support Wei Liu
2015-02-11 16:13   ` Ian Jackson
2015-01-23 11:13 ` [PATCH v4 20/21] libxlu: introduce new APIs Wei Liu
2015-02-11 16:17   ` Ian Jackson
2015-02-12 10:57     ` Wei Liu
2015-01-23 11:13 ` [PATCH v4 21/21] xl: vNUMA support Wei Liu
2015-01-28 16:46   ` Ian Campbell
2015-01-28 22:52     ` Wei Liu
2015-01-29 11:10       ` Ian Campbell
2015-01-29 17:46         ` Wei Liu
2015-02-24 16:15           ` Dario Faggioli

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.