File indexing completed on 2025-01-17 09:55:53
0001 #ifndef NUMAIF_H
0002 #define NUMAIF_H 1
0003
0004 #ifdef __cplusplus
0005 extern "C" {
0006 #endif
0007
0008
0009
0010
0011 extern long get_mempolicy(int *mode, unsigned long *nmask,
0012 unsigned long maxnode, void *addr, unsigned flags);
0013 extern long mbind(void *start, unsigned long len, int mode,
0014 const unsigned long *nmask, unsigned long maxnode, unsigned flags);
0015 extern long set_mempolicy(int mode, const unsigned long *nmask,
0016 unsigned long maxnode);
0017 extern long migrate_pages(int pid, unsigned long maxnode,
0018 const unsigned long *frommask,
0019 const unsigned long *tomask);
0020
0021 extern long move_pages(int pid, unsigned long count,
0022 void **pages, const int *nodes, int *status, int flags);
0023
0024 extern int set_mempolicy_home_node(void *start, unsigned long len,
0025 int home_node, int flag);
0026
0027
0028 #define MPOL_DEFAULT 0
0029 #define MPOL_PREFERRED 1
0030 #define MPOL_BIND 2
0031 #define MPOL_INTERLEAVE 3
0032 #define MPOL_LOCAL 4
0033 #define MPOL_PREFERRED_MANY 5
0034 #define MPOL_MAX 6
0035
0036
0037 #define MPOL_F_NUMA_BALANCING (1 << 13)
0038 #define MPOL_F_RELATIVE_NODES (1 << 14)
0039 #define MPOL_F_STATIC_NODES (1 << 15)
0040
0041
0042 #define MPOL_F_NODE (1<<0)
0043
0044
0045 #define MPOL_F_ADDR (1<<1)
0046 #define MPOL_F_MEMS_ALLOWED (1<<2)
0047
0048
0049 #define MPOL_MF_STRICT (1<<0)
0050 #define MPOL_MF_MOVE (1<<1)
0051 #define MPOL_MF_MOVE_ALL (1<<2)
0052
0053 #ifdef __cplusplus
0054 }
0055 #endif
0056
0057 #endif