[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC PATCH v2 00/25] ARM: Add Xen NUMA support



From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxx>

With this RFC patch series, NUMA support is added for ARM platform.
Both DT and ACPI based NUMA support is added.
Only Xen is made aware of NUMA platform. NUMA awareness to DOM0 is not
added.

As part of this series, the code under x86 architecture is
reused by moving into common files.
New files xen/common/numa.c and xen/drivers/acpi/srat.c files are
added.
For ARM specific new folder is added xen/arch/arm/numa and new files
numa.c, dt_numa.c and acpi_numa are introduced under this folder.

DT NUMA: The following major changes are performed
 - Dropped numa-node-id information from Dom0 DT.
   So that Dom0 devices make allocation from node 0 for
   devmalloc requests.
 - Memory DT is not deleted by EFI. It is exposed to Xen
   to extract numa information.
 - On NUMA failure, Fallback to Non-NUMA booting.ACPI_SRAT_TYPE_MEMORY_AFFINITY
   Assuming all the memory and CPU's are under node 0.
 - CONFIG_NUMA is introduced.

ACPI NUMA:
 - MADT is parsed before parsing SRAT table to extract
   CPU_ID to MPIDR mapping info. In Linux, while parsing SRAT
   table, MADT table is opened and extract MPIDR. This
   approach avoids opening ACPI tables recursively.
 - SRAT table is parsed for ACPI_SRAT_TYPE_GICC_AFFINITY to extract
   proximity info and MPIDR from CPU_ID to MPIDR mapping table.
 - SRAT table is parsed for ACPI_SRAT_TYPE_MEMORY_AFFINITY to extract
   memory proximity.
 - Re-use SLIT parsing of x86 for node distance information.
 - CONFIG_ACPI_NUMA is introduced

No changes are made to x86 implementation only code is sanitized and refactored.
Hence only compilation tested for x86.

Code is shared at
https://github.com/vijaykilari/xen-numa/commits/rfc_2

v2: Major changes
  - Rebased to lastest staging branch
  - Reworked on x86 NUMA code and cleanup to possible extent.
    Patches 1 to 8 are created for this
  - Reworked on DT and ACPI NUMA extracting information
  - Reused DT code for memory node processing to extract NUMA info.
  - Fixed issues with DT processing
  - Added arch specific processing of SRAT
  - Reworked on MADT and SRAT processing
  - Reworked on node distance
  - All ARM changes are moved under folder arch/arm/numa.
  - NUMA ACPI common changes are kept in drivers/acpi/srat.c

Vijaya Kumar K (25):
  x86: NUMA: Clean up: Drop trailing spaces
  x86: NUMA: Fix datatypes and attributes
  x86: NUMA: Rename and sanitize some common functions
  x86: NUMA: Add accessors for acpi_numa, numa_off and numa_fake
    variables
  x86: NUMA: Move generic dummy_numa_init to separate function
  x86: NUMA: Add accessors for nodes[] and node_memblk_range[] structs
  x86: NUMA: Rename some generic functions
  x86: NUMA: Sanitize node distance
  ARM: NUMA: Add existing ARM numa code under CONFIG_NUMA
  x86: NUMA: Move numa code and make it generic
  x86: NUMA: Move common code from srat.c
  ARM: NUMA: Parse CPU NUMA information
  ARM: NUMA: Parse memory NUMA information
  ARM: NUMA: Parse NUMA distance information
  ARM: NUMA: Add CPU NUMA support
  ARM: NUMA: Add memory NUMA support
  ARM: NUMA: Add fallback on NUMA failure
  ARM: NUMA: Do not expose numa info to DOM0
  ACPI: Refactor acpi SRAT and SLIT table handling code
  ARM: NUMA: Extract MPIDR from MADT table
  ACPI: Move arch specific SRAT parsing
  ARM: NUMA: Extract proximity from SRAT table
  ARM: NUMA: Initialize ACPI NUMA
  NUMA: Move CONFIG_NUMA to common Kconfig
  NUMA: Enable ACPI_NUMA config

 xen/arch/arm/Makefile               |   1 +
 xen/arch/arm/acpi/boot.c            |   2 +
 xen/arch/arm/bootfdt.c              |  44 ++-
 xen/arch/arm/domain_build.c         |   9 +
 xen/arch/arm/efi/efi-boot.h         |  25 --
 xen/arch/arm/numa/Makefile          |   3 +
 xen/arch/arm/numa/acpi_numa.c       | 249 ++++++++++++++
 xen/arch/arm/numa/dt_numa.c         | 244 +++++++++++++
 xen/arch/arm/numa/numa.c            | 196 +++++++++++
 xen/arch/arm/setup.c                |   4 +
 xen/arch/arm/smpboot.c              |  25 +-
 xen/arch/x86/dom0_build.c           |   1 +
 xen/arch/x86/mm.c                   |   2 -
 xen/arch/x86/numa.c                 | 454 +------------------------
 xen/arch/x86/physdev.c              |   1 +
 xen/arch/x86/setup.c                |   3 +-
 xen/arch/x86/smpboot.c              |   3 +-
 xen/arch/x86/srat.c                 | 412 ++++------------------
 xen/arch/x86/x86_64/mm.c            |   3 +-
 xen/common/Kconfig                  |   4 +
 xen/common/Makefile                 |   1 +
 xen/common/numa.c                   | 662 ++++++++++++++++++++++++++++++++++++
 xen/drivers/acpi/Kconfig            |   5 +-
 xen/drivers/acpi/Makefile           |   1 +
 xen/drivers/acpi/numa.c             |  58 +---
 xen/drivers/acpi/srat.c             | 299 ++++++++++++++++
 xen/drivers/passthrough/vtd/iommu.c |   1 +
 xen/include/acpi/actbl1.h           |  17 +-
 xen/include/acpi/srat.h             |  24 ++
 xen/include/asm-arm/numa.h          |  73 +++-
 xen/include/asm-arm/setup.h         |   6 +-
 xen/include/asm-x86/acpi.h          |   4 -
 xen/include/asm-x86/config.h        |   1 -
 xen/include/asm-x86/mm.h            |   1 -
 xen/include/asm-x86/numa.h          |  64 +---
 xen/include/xen/acpi.h              |   6 +
 xen/include/xen/mm.h                |   2 +
 xen/include/xen/numa.h              |  42 +++
 38 files changed, 2023 insertions(+), 929 deletions(-)
 create mode 100644 xen/arch/arm/numa/Makefile
 create mode 100644 xen/arch/arm/numa/acpi_numa.c
 create mode 100644 xen/arch/arm/numa/dt_numa.c
 create mode 100644 xen/arch/arm/numa/numa.c
 create mode 100644 xen/common/numa.c
 create mode 100644 xen/drivers/acpi/srat.c
 create mode 100644 xen/include/acpi/srat.h

-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.