Back to home page

EIC code displayed by LXR

 
 

    


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 /* Kernel interface for NUMA API */
0009 
0010 /* System calls */
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 /* Policies */
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 /* Flags for set_mempolicy, specified in mode */
0037 #define MPOL_F_NUMA_BALANCING   (1 << 13) /* Optimize with NUMA balancing if possible */
0038 #define MPOL_F_RELATIVE_NODES (1 << 14)
0039 #define MPOL_F_STATIC_NODES (1 << 15)
0040     
0041 /* Flags for get_mem_policy */
0042 #define MPOL_F_NODE    (1<<0)   /* return next il node or node of address */
0043                 /* Warning: MPOL_F_NODE is unsupported and
0044                    subject to change. Don't use. */
0045 #define MPOL_F_ADDR     (1<<1)  /* look up vma using address */
0046 #define MPOL_F_MEMS_ALLOWED (1<<2) /* query nodes allowed in cpuset */
0047 
0048 /* Flags for mbind */
0049 #define MPOL_MF_STRICT  (1<<0)  /* Verify existing pages in the mapping */
0050 #define MPOL_MF_MOVE    (1<<1)  /* Move pages owned by this process to conform to mapping */
0051 #define MPOL_MF_MOVE_ALL (1<<2) /* Move every page to conform to mapping */
0052 
0053 #ifdef __cplusplus
0054 }
0055 #endif
0056 
0057 #endif