diff options
| author | Chen Ridong <chenridong@huawei.com> | 2024-08-30 13:02:28 +0300 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2024-08-30 23:00:16 +0300 |
| commit | 1abab1ba0775036bb67c6c57945c637be644c04f (patch) | |
| tree | 2ba00e983c38999335d5b1a20b009f1d6ec3f912 /include/linux | |
| parent | 381b53c3b5494026199a11a2744074086e352b2b (diff) | |
| download | linux-1abab1ba0775036bb67c6c57945c637be644c04f.tar.xz | |
cgroup/cpuset: guard cpuset-v1 code under CONFIG_CPUSETS_V1
This patch introduces CONFIG_CPUSETS_V1 and guard cpuset-v1 code under
CONFIG_CPUSETS_V1. The default value of CONFIG_CPUSETS_V1 is N, so that
user who adopted v2 don't have 'pay' for cpuset v1.
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cpuset.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 2a6981eeebf8..835e7b793f6a 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h @@ -99,6 +99,7 @@ static inline bool cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask) extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1, const struct task_struct *tsk2); +#ifdef CONFIG_CPUSETS_V1 #define cpuset_memory_pressure_bump() \ do { \ if (cpuset_memory_pressure_enabled) \ @@ -106,6 +107,9 @@ extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1, } while (0) extern int cpuset_memory_pressure_enabled; extern void __cpuset_memory_pressure_bump(void); +#else +static inline void cpuset_memory_pressure_bump(void) { } +#endif extern void cpuset_task_status_allowed(struct seq_file *m, struct task_struct *task); |
