History

cgroup: remove cgroup_enable_task_cg_lists() optimization

cgroup_enable_task_cg_lists() is used to lazyily initialize task cgroup associations on the first use to reduce fork / exit overheads on systems which don't use cgroup. Unfortunately, locking around it has never been actually correct and its value is dubious given how the vast majority of systems use cgroup right away from boot. This patch removes the optimization. For now, replace the cg_list based branches with WARN_ON_ONCE()'s to be on the safe side. We can simplify the logic further in the future.

Tejun Heo committed 7 years ago

Commit 5153faa1 parent a713af33 files · +39 −148Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/cgroup.h+0−1
@@ -150,7 +150,6 @@ struct task_struct *cgroup_taskset_first(struct cgroup_taskset *tset, · 149 unmodified lines
150struct task_struct *cgroup_taskset_next(struct cgroup_taskset *tset,150struct task_struct *cgroup_taskset_next(struct cgroup_taskset *tset,
151 struct cgroup_subsys_state **dst_cssp);151 struct cgroup_subsys_state **dst_cssp);
152 152
153void cgroup_enable_task_cg_lists(void);
154void css_task_iter_start(struct cgroup_subsys_state *css, unsigned int flags,153void css_task_iter_start(struct cgroup_subsys_state *css, unsigned int flags,
155 struct css_task_iter *it);154 struct css_task_iter *it);
156struct task_struct *css_task_iter_next(struct css_task_iter *it);155struct task_struct *css_task_iter_next(struct css_task_iter *it);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t