Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
at v4.12-rc2 46 lines 1.2 kB view raw
1#ifndef _LINUX_SCHED_NUMA_BALANCING_H 2#define _LINUX_SCHED_NUMA_BALANCING_H 3 4/* 5 * This is the interface between the scheduler and the MM that 6 * implements memory access pattern based NUMA-balancing: 7 */ 8 9#include <linux/sched.h> 10 11#define TNF_MIGRATED 0x01 12#define TNF_NO_GROUP 0x02 13#define TNF_SHARED 0x04 14#define TNF_FAULT_LOCAL 0x08 15#define TNF_MIGRATE_FAIL 0x10 16 17#ifdef CONFIG_NUMA_BALANCING 18extern void task_numa_fault(int last_node, int node, int pages, int flags); 19extern pid_t task_numa_group_id(struct task_struct *p); 20extern void set_numabalancing_state(bool enabled); 21extern void task_numa_free(struct task_struct *p); 22extern bool should_numa_migrate_memory(struct task_struct *p, struct page *page, 23 int src_nid, int dst_cpu); 24#else 25static inline void task_numa_fault(int last_node, int node, int pages, 26 int flags) 27{ 28} 29static inline pid_t task_numa_group_id(struct task_struct *p) 30{ 31 return 0; 32} 33static inline void set_numabalancing_state(bool enabled) 34{ 35} 36static inline void task_numa_free(struct task_struct *p) 37{ 38} 39static inline bool should_numa_migrate_memory(struct task_struct *p, 40 struct page *page, int src_nid, int dst_cpu) 41{ 42 return true; 43} 44#endif 45 46#endif /* _LINUX_SCHED_NUMA_BALANCING_H */