Linux Assemblycollection of fast libraries

Non-Uniform Memory Access (NUMA) system calls

We are used to thinking of the computer’s memory as a homogeneous, shared resource. Disregarding the role of the hardware caches, we expect the time required for a CPU to access a memory location to be essentially the same, regardless of the location’s physical address and the CPU. Unfortunately, this assumption is not true.

Linux supports the Non-Uniform Memory Access (NUMA) model, in which the access times for different memory locations from a given CPU may vary. The physical memory of the system is partitioned in several nodes. The time needed by a given CPU to access pages within a single node is the same. However, this time might not be the same for two different CPUs. For every CPU, the kernel tries to minimize the number of accesses to costly nodes by carefully selecting where the kernel data structures that are most often referenced by the CPU are stored.

Contents

Tip: For detailed information about each system call please read: Linux man pages

CPU node

SyscallNumberDescription
GETCPU309Determine CPU and NUMA node on which the calling thread is running

Memory node

SyscallNumberDescription
SET_MEMPOLICY238Set default NUMA memory policy for a process and its children
GET_MEMPOLICY239Retrieve NUMA memory policy for a process
MBIND237Set the NUMA memory policy for a memory range
MOVE_PAGES279Move individual pages of a process to another node
MIGRATE_PAGES256Move all pages in a process to another set of nodes
Copyright 2012-2016 Jack Black. All rights reserved.