diff options
| -rw-r--r-- | kernel/cgroup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index e2f46ba37f72..aa95591c1430 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -4845,12 +4845,16 @@ static int __init cgroup_wq_init(void) | |||
| 4845 | /* | 4845 | /* |
| 4846 | * There isn't much point in executing destruction path in | 4846 | * There isn't much point in executing destruction path in |
| 4847 | * parallel. Good chunk is serialized with cgroup_mutex anyway. | 4847 | * parallel. Good chunk is serialized with cgroup_mutex anyway. |
| 4848 | * Use 1 for @max_active. | 4848 | * |
| 4849 | * XXX: Must be ordered to make sure parent is offlined after | ||
| 4850 | * children. The ordering requirement is for memcg where a | ||
| 4851 | * parent's offline may wait for a child's leading to deadlock. In | ||
| 4852 | * the long term, this should be fixed from memcg side. | ||
| 4849 | * | 4853 | * |
| 4850 | * We would prefer to do this in cgroup_init() above, but that | 4854 | * We would prefer to do this in cgroup_init() above, but that |
| 4851 | * is called before init_workqueues(): so leave this until after. | 4855 | * is called before init_workqueues(): so leave this until after. |
| 4852 | */ | 4856 | */ |
| 4853 | cgroup_destroy_wq = alloc_workqueue("cgroup_destroy", 0, 1); | 4857 | cgroup_destroy_wq = alloc_ordered_workqueue("cgroup_destroy", 0); |
| 4854 | BUG_ON(!cgroup_destroy_wq); | 4858 | BUG_ON(!cgroup_destroy_wq); |
| 4855 | 4859 | ||
| 4856 | /* | 4860 | /* |
