All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 00/23] Virtual NUMA for PV and HVM
@ 2015-02-26 15:55 Wei Liu
  2015-02-26 15:55 ` [PATCH v6 01/23] xen: factor out construct_memop_from_reservation Wei Liu
                   ` (22 more replies)
  0 siblings, 23 replies; 81+ messages in thread
From: Wei Liu @ 2015-02-26 15:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu

Hi all

This is version 6 of this series rebased on top of staging.

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>

Wei Liu (23):
  xen: factor out construct_memop_from_reservation
  xen: move NUMA_NO_NODE to public memory.h as XEN_NUMA_NO_NODE
  xen: make two memory hypercalls vNUMA-aware
  libxc: duplicate snippet to allocate p2m_host array
  libxc: add p2m_size to xc_dom_image
  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
  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
  libxl: define LIBXL_HAVE_VNUMA
  libxlu: rework internal representation of setting
  libxlu: nested list support
  libxlu: record line and column number when parsing values
  libxlu: introduce new APIs
  xl: introduce xcalloc
  xl: vNUMA support

 docs/man/xl.cfg.pod.5                    |  54 +++++++
 tools/libxc/include/xc_dom.h             |  13 +-
 tools/libxc/include/xenguest.h           |  11 ++
 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                | 253 +++++++++++++++++++++++++++++++
 tools/libxl/libxl_x86.c                  | 105 +++++++++++--
 tools/libxl/libxlu_cfg.c                 | 209 ++++++++++++++++++-------
 tools/libxl/libxlu_cfg_i.h               |  14 +-
 tools/libxl/libxlu_cfg_y.c               |  72 ++++-----
 tools/libxl/libxlu_cfg_y.h               |   2 +-
 tools/libxl/libxlu_cfg_y.y               |  18 ++-
 tools/libxl/libxlu_internal.h            |  24 ++-
 tools/libxl/libxlutil.h                  |  13 ++
 tools/libxl/xl_cmdimpl.c                 | 150 +++++++++++++++++-
 xen/arch/x86/hpet.c                      |   2 +-
 xen/arch/x86/irq.c                       |   4 +-
 xen/arch/x86/numa.c                      |  14 +-
 xen/arch/x86/physdev.c                   |   2 +-
 xen/arch/x86/setup.c                     |   2 +-
 xen/arch/x86/smpboot.c                   |   2 +-
 xen/arch/x86/srat.c                      |  28 ++--
 xen/arch/x86/x86_64/mm.c                 |   2 +-
 xen/common/kernel.c                      |   2 +-
 xen/common/memory.c                      |  85 ++++++++---
 xen/common/page_alloc.c                  |   4 +-
 xen/drivers/passthrough/amd/iommu_init.c |   2 +-
 xen/drivers/passthrough/vtd/iommu.c      |   8 +-
 xen/include/public/features.h            |   3 +
 xen/include/public/memory.h              |   4 +
 xen/include/xen/numa.h                   |   5 +-
 42 files changed, 1392 insertions(+), 282 deletions(-)
 create mode 100644 tools/libxl/libxl_vnuma.c

-- 
1.9.1

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

end of thread, other threads:[~2015-03-06 16:57 UTC | newest]

Thread overview: 81+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 15:55 [PATCH v6 00/23] Virtual NUMA for PV and HVM Wei Liu
2015-02-26 15:55 ` [PATCH v6 01/23] xen: factor out construct_memop_from_reservation Wei Liu
2015-02-27 10:57   ` Andrew Cooper
2015-02-26 15:55 ` [PATCH v6 02/23] xen: move NUMA_NO_NODE to public memory.h as XEN_NUMA_NO_NODE Wei Liu
2015-02-27 11:38   ` Andrew Cooper
2015-02-27 16:42   ` Jan Beulich
2015-02-27 16:51     ` Wei Liu
2015-02-27 16:52       ` Andrew Cooper
2015-03-02  7:04         ` Jan Beulich
2015-03-02 15:30           ` Ian Campbell
2015-03-02 15:38             ` Wei Liu
2015-03-02 15:51               ` Jan Beulich
2015-03-02 16:08                 ` Wei Liu
2015-03-02 16:27                   ` Jan Beulich
2015-03-02 16:39                     ` Wei Liu
2015-03-02 16:50                       ` Jan Beulich
2015-03-02 17:00                         ` Wei Liu
2015-03-03  7:44                           ` Jan Beulich
2015-03-03 11:08                             ` Wei Liu
2015-03-02 17:01                         ` Andrew Cooper
2015-03-02 17:26                           ` Jan Beulich
2015-03-02 17:34                             ` David Vrabel
2015-03-02 17:43                               ` Andrew Cooper
2015-03-02 17:48                                 ` David Vrabel
2015-03-02 17:52                                   ` Ian Campbell
2015-03-02 18:19                                     ` Andrew Cooper
2015-03-03  3:42                                       ` Dario Faggioli
2015-03-03  8:55                                         ` Jan Beulich
2015-03-04 12:51                                           ` Dario Faggioli
2015-03-03  7:56                                       ` Jan Beulich
2015-03-03  7:36                               ` Jan Beulich
2015-02-26 15:55 ` [PATCH v6 03/23] xen: make two memory hypercalls vNUMA-aware Wei Liu
2015-02-27 16:59   ` Jan Beulich
2015-02-27 17:03     ` Wei Liu
2015-02-26 15:55 ` [PATCH v6 04/23] libxc: duplicate snippet to allocate p2m_host array Wei Liu
2015-03-02 15:26   ` Ian Campbell
2015-03-02 15:33     ` Wei Liu
2015-03-02 16:18       ` Ian Campbell
2015-03-02 16:45         ` Konrad Rzeszutek Wilk
2015-03-02 16:46     ` Konrad Rzeszutek Wilk
2015-02-26 15:55 ` [PATCH v6 05/23] libxc: add p2m_size to xc_dom_image Wei Liu
2015-03-02 15:28   ` Ian Campbell
2015-02-26 15:55 ` [PATCH v6 06/23] libxc: allocate memory with vNUMA information for PV guest Wei Liu
2015-03-02 15:36   ` Ian Campbell
2015-02-26 15:55 ` [PATCH v6 07/23] libxl: introduce vNUMA types Wei Liu
2015-02-26 15:55 ` [PATCH v6 08/23] libxl: add vmemrange to libxl__domain_build_state Wei Liu
2015-02-26 15:55 ` [PATCH v6 09/23] libxl: introduce libxl__vnuma_config_check Wei Liu
2015-03-02 15:34   ` Ian Campbell
2015-03-02 15:50     ` Wei Liu
2015-03-03  3:52     ` Dario Faggioli
2015-02-26 15:55 ` [PATCH v6 10/23] libxl: x86: factor out e820_host_sanitize Wei Liu
2015-02-26 15:55 ` [PATCH v6 11/23] libxl: functions to build vmemranges for PV guest Wei Liu
2015-02-26 16:39   ` Dario Faggioli
2015-03-02 15:41   ` Ian Campbell
2015-03-02 17:52     ` Wei Liu
2015-02-26 15:55 ` [PATCH v6 12/23] libxl: build, check and pass vNUMA info to Xen " Wei Liu
2015-02-26 15:55 ` [PATCH v6 13/23] libxc: indentation change to xc_hvm_build_x86.c Wei Liu
2015-02-26 15:55 ` [PATCH v6 14/23] libxc: allocate memory with vNUMA information for HVM guest Wei Liu
2015-03-02 15:43   ` Ian Campbell
2015-02-26 15:55 ` [PATCH v6 15/23] libxl: build, check and pass vNUMA info to Xen " Wei Liu
2015-03-02 15:44   ` Ian Campbell
2015-02-26 15:55 ` [PATCH v6 16/23] libxl: disallow memory relocation when vNUMA is enabled Wei Liu
2015-03-02 15:46   ` Ian Campbell
2015-02-26 15:56 ` [PATCH v6 17/23] libxl: define LIBXL_HAVE_VNUMA Wei Liu
2015-02-27 13:46   ` Dario Faggioli
2015-02-26 15:56 ` [PATCH v6 18/23] libxlu: rework internal representation of setting Wei Liu
2015-02-26 15:56 ` [PATCH v6 19/23] libxlu: nested list support Wei Liu
2015-02-26 15:56 ` [PATCH v6 20/23] libxlu: record line and column number when parsing values Wei Liu
2015-03-06 11:36   ` Ian Jackson
2015-03-06 12:03     ` Wei Liu
2015-03-06 14:30       ` Ian Jackson
2015-03-06 16:11         ` Wei Liu
2015-03-06 16:57           ` Wei Liu
2015-02-26 15:56 ` [PATCH v6 21/23] libxlu: introduce new APIs Wei Liu
2015-03-06 11:40   ` Ian Jackson
2015-02-26 15:56 ` [PATCH v6 22/23] xl: introduce xcalloc Wei Liu
2015-03-02 15:51   ` Ian Campbell
2015-02-26 15:56 ` [PATCH v6 23/23] xl: vNUMA support Wei Liu
2015-02-27 16:17   ` Dario Faggioli
2015-03-02 15:59   ` Ian Campbell
2015-03-02 16:31     ` 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.