linux/tools/testing/memblock/scripts/Makefile.include
Rebecca Mckeever b338bde5a3 memblock tests: add simulation of physical memory with multiple NUMA nodes
Add function setup_numa_memblock() for setting up a memory layout with
multiple NUMA nodes in a previously allocated dummy physical memory.
This function can be used in place of setup_memblock() in tests that need
to simulate a NUMA system.

setup_numa_memblock():
- allows for setting up a memory layout by specifying the fraction of
  MEM_SIZE in each node

Set CONFIG_NODES_SHIFT to 4 when building with NUMA=1 to allow for up to
16 NUMA nodes.

Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/4566d816a85f009268d4858d1ef06c7571a960f9.1663046060.git.remckee0@gmail.com
2022-09-18 10:30:20 +03:00

20 lines
460 B
Makefile

# SPDX-License-Identifier: GPL-2.0
# Definitions for user-provided arguments
# Simulate CONFIG_NUMA=y
ifeq ($(NUMA), 1)
CFLAGS += -D CONFIG_NUMA -D CONFIG_NODES_SHIFT=4
endif
# Use 32 bit physical addresses.
# Remember to install 32-bit version of dependencies.
ifeq ($(32BIT_PHYS_ADDR_T), 1)
CFLAGS += -m32 -U CONFIG_PHYS_ADDR_T_64BIT
LDFLAGS += -m32
endif
# Enable memblock_dbg() messages
ifeq ($(MEMBLOCK_DEBUG), 1)
CFLAGS += -D MEMBLOCK_DEBUG
endif