diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cpuset.h | 4 | ||||
-rw-r--r-- | include/linux/sched.h | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index ade2390ffe92..6e39c9bb0dae 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -93,12 +93,12 @@ extern int cpuset_slab_spread_node(void); | |||
93 | 93 | ||
94 | static inline int cpuset_do_page_mem_spread(void) | 94 | static inline int cpuset_do_page_mem_spread(void) |
95 | { | 95 | { |
96 | return current->flags & PF_SPREAD_PAGE; | 96 | return task_spread_page(current); |
97 | } | 97 | } |
98 | 98 | ||
99 | static inline int cpuset_do_slab_mem_spread(void) | 99 | static inline int cpuset_do_slab_mem_spread(void) |
100 | { | 100 | { |
101 | return current->flags & PF_SPREAD_SLAB; | 101 | return task_spread_slab(current); |
102 | } | 102 | } |
103 | 103 | ||
104 | extern int current_cpuset_is_being_rebound(void); | 104 | extern int current_cpuset_is_being_rebound(void); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5630763956d9..7b1cafefb05e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1903,8 +1903,6 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, | |||
1903 | #define PF_KTHREAD 0x00200000 /* I am a kernel thread */ | 1903 | #define PF_KTHREAD 0x00200000 /* I am a kernel thread */ |
1904 | #define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */ | 1904 | #define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */ |
1905 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ | 1905 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ |
1906 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ | ||
1907 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ | ||
1908 | #define PF_NO_SETAFFINITY 0x04000000 /* Userland is not allowed to meddle with cpus_allowed */ | 1906 | #define PF_NO_SETAFFINITY 0x04000000 /* Userland is not allowed to meddle with cpus_allowed */ |
1909 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ | 1907 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ |
1910 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | 1908 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ |
@@ -1958,6 +1956,9 @@ static inline void memalloc_noio_restore(unsigned int flags) | |||
1958 | 1956 | ||
1959 | /* Per-process atomic flags. */ | 1957 | /* Per-process atomic flags. */ |
1960 | #define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */ | 1958 | #define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */ |
1959 | #define PFA_SPREAD_PAGE 1 /* Spread page cache over cpuset */ | ||
1960 | #define PFA_SPREAD_SLAB 2 /* Spread some slab caches over cpuset */ | ||
1961 | |||
1961 | 1962 | ||
1962 | #define TASK_PFA_TEST(name, func) \ | 1963 | #define TASK_PFA_TEST(name, func) \ |
1963 | static inline bool task_##func(struct task_struct *p) \ | 1964 | static inline bool task_##func(struct task_struct *p) \ |
@@ -1972,6 +1973,14 @@ static inline void memalloc_noio_restore(unsigned int flags) | |||
1972 | TASK_PFA_TEST(NO_NEW_PRIVS, no_new_privs) | 1973 | TASK_PFA_TEST(NO_NEW_PRIVS, no_new_privs) |
1973 | TASK_PFA_SET(NO_NEW_PRIVS, no_new_privs) | 1974 | TASK_PFA_SET(NO_NEW_PRIVS, no_new_privs) |
1974 | 1975 | ||
1976 | TASK_PFA_TEST(SPREAD_PAGE, spread_page) | ||
1977 | TASK_PFA_SET(SPREAD_PAGE, spread_page) | ||
1978 | TASK_PFA_CLEAR(SPREAD_PAGE, spread_page) | ||
1979 | |||
1980 | TASK_PFA_TEST(SPREAD_SLAB, spread_slab) | ||
1981 | TASK_PFA_SET(SPREAD_SLAB, spread_slab) | ||
1982 | TASK_PFA_CLEAR(SPREAD_SLAB, spread_slab) | ||
1983 | |||
1975 | /* | 1984 | /* |
1976 | * task->jobctl flags | 1985 | * task->jobctl flags |
1977 | */ | 1986 | */ |