Commit 1a11533f authored by Tejun Heo's avatar Tejun Heo

Revert "cgroup: use an ordered workqueue for cgroup destruction"

This reverts commit ab3f5faa.
Explanation from Hugh:

  It's because more thorough testing, by others here, found that it
  wasn't always solving the problem: so I asked Tejun privately to
  hold off from sending it in, until we'd worked out why not.

  Most of our testing being on a v3,11-based kernel, it was perfectly
  possible that the problem was merely our own e.g. missing Tejun's
  8a2b7538 ("workqueue: fix ordered workqueues in NUMA setups").

  But that turned out not to be enough to fix it either. Then Filipe
  pointed out how percpu_ref_kill_and_confirm() uses call_rcu_sched()
  before we ever get to put the offline on to the workqueue: by the
  time we get to the workqueue, the ordering has already been lost.

  So, thanks for the Acks, but I'm afraid that this ordered workqueue
  solution is just not good enough: we should simply forget that patch
  and provide a different answer."
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
parent 0ab02ca8
......@@ -4844,16 +4844,12 @@ static int __init cgroup_wq_init(void)
/*
* There isn't much point in executing destruction path in
* parallel. Good chunk is serialized with cgroup_mutex anyway.
*
* XXX: Must be ordered to make sure parent is offlined after
* children. The ordering requirement is for memcg where a
* parent's offline may wait for a child's leading to deadlock. In
* the long term, this should be fixed from memcg side.
* Use 1 for @max_active.
*
* We would prefer to do this in cgroup_init() above, but that
* is called before init_workqueues(): so leave this until after.
*/
cgroup_destroy_wq = alloc_ordered_workqueue("cgroup_destroy", 0);
cgroup_destroy_wq = alloc_workqueue("cgroup_destroy", 0, 1);
BUG_ON(!cgroup_destroy_wq);
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment