linux/include/uapi/linux/mempolicy.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 * NUMA memory policies for Linux.
 * Copyright 2003,2004 Andi Kleen SuSE Labs
 */
#ifndef _UAPI_LINUX_MEMPOLICY_H
#define _UAPI_LINUX_MEMPOLICY_H

#include <linux/errno.h>


/*
 * Both the MPOL_* mempolicy mode and the MPOL_F_* optional mode flags are
 * passed by the user to either set_mempolicy() or mbind() in an 'int' actual.
 * The MPOL_MODE_FLAGS macro determines the legal set of optional mode flags.
 */

/* Policies */
enum {};

/* Flags for set_mempolicy */
#define MPOL_F_STATIC_NODES
#define MPOL_F_RELATIVE_NODES
#define MPOL_F_NUMA_BALANCING

/*
 * MPOL_MODE_FLAGS is the union of all possible optional mode flags passed to
 * either set_mempolicy() or mbind().
 */
#define MPOL_MODE_FLAGS

/* Flags for get_mempolicy */
#define MPOL_F_NODE
#define MPOL_F_ADDR
#define MPOL_F_MEMS_ALLOWED

/* Flags for mbind */
#define MPOL_MF_STRICT
#define MPOL_MF_MOVE
#define MPOL_MF_MOVE_ALL
#define MPOL_MF_LAZY
#define MPOL_MF_INTERNAL

#define MPOL_MF_VALID

/*
 * Internal flags that share the struct mempolicy flags word with
 * "mode flags".  These flags are allocated from bit 0 up, as they
 * are never OR'ed into the mode in mempolicy API arguments.
 */
#define MPOL_F_SHARED
#define MPOL_F_MOF
#define MPOL_F_MORON

/*
 * These bit locations are exposed in the vm.zone_reclaim_mode sysctl
 * ABI.  New bits are OK, but existing bits can never change.
 */
#define RECLAIM_ZONE
#define RECLAIM_WRITE
#define RECLAIM_UNMAP

#endif /* _UAPI_LINUX_MEMPOLICY_H */