support to utility thread offloading
This commit is contained in:
@@ -231,6 +231,10 @@ enum mpol_rebind_step {
|
||||
#define MPOL_F_MOF (1 << 3) /* this policy wants migrate on fault */
|
||||
#define MPOL_F_MORON (1 << 4) /* Migrate On pte_numa Reference On Node */
|
||||
|
||||
#define SPAWN_TO_LOCAL 0
|
||||
#define SPAWN_TO_REMOTE 1
|
||||
#define SPAWNING_TO_REMOTE 1001
|
||||
|
||||
#include <waitq.h>
|
||||
#include <futex.h>
|
||||
|
||||
@@ -667,6 +671,11 @@ struct thread {
|
||||
|
||||
/* Syscall offload wait queue head */
|
||||
struct waitq scd_wq;
|
||||
|
||||
int thread_offloaded;
|
||||
int mod_clone;
|
||||
struct uti_attr *mod_clone_arg;
|
||||
int parent_cpuid;
|
||||
};
|
||||
|
||||
#define VM_RANGE_CACHE_SIZE 4
|
||||
|
||||
@@ -517,4 +517,34 @@ struct perf_ctrl_desc {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#define UTI_FLAG_NUMA_SET (1ULL<<1) /* Indicates NUMA_SET is specified */
|
||||
|
||||
#define UTI_FLAG_SAME_NUMA_DOMAIN (1ULL<<2)
|
||||
#define UTI_FLAG_DIFFERENT_NUMA_DOMAIN (1ULL<<3)
|
||||
|
||||
#define UTI_FLAG_SAME_L1 (1ULL<<4)
|
||||
#define UTI_FLAG_SAME_L2 (1ULL<<5)
|
||||
#define UTI_FLAG_SAME_L3 (1ULL<<6)
|
||||
|
||||
#define UTI_FLAG_DIFFERENT_L1 (1ULL<<7)
|
||||
#define UTI_FLAG_DIFFERENT_L2 (1ULL<<8)
|
||||
#define UTI_FLAG_DIFFERENT_L3 (1ULL<<9)
|
||||
|
||||
#define UTI_FLAG_EXCLUSIVE_CPU (1ULL<<10)
|
||||
#define UTI_FLAG_CPU_INTENSIVE (1ULL<<11)
|
||||
#define UTI_FLAG_HIGH_PRIORITY (1ULL<<12)
|
||||
#define UTI_FLAG_NON_COOPERATIVE (1ULL<<13)
|
||||
|
||||
/* Linux default value is used */
|
||||
#define UTI_MAX_NUMA_DOMAINS (1024)
|
||||
|
||||
typedef struct uti_attr {
|
||||
/* UTI_CPU_SET environmental variable is used to denote the preferred
|
||||
location of utility thread */
|
||||
uint64_t numa_set[(UTI_MAX_NUMA_DOMAINS + sizeof(uint64_t) * 8 - 1) /
|
||||
(sizeof(uint64_t) * 8)];
|
||||
uint64_t flags; /* Representing location and behavior hints by bitmap */
|
||||
} uti_attr_t;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user