summaryrefslogtreecommitdiff
path: root/kernel/bpf
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2015-01-22 15:19:43 (GMT)
committerTejun Heo <tj@kernel.org>2015-01-22 15:26:43 (GMT)
commit3c606d35fe9766ede86a45273a628b320be13b45 (patch)
treed8430fbb2cd53b9926770d2706c83243485c5482 /kernel/bpf
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff)
downloadlinux-3c606d35fe9766ede86a45273a628b320be13b45.tar.xz
cgroup: prevent mount hang due to memory controller lifetime
Since b2052564e66d ("mm: memcontrol: continue cache reclaim from offlined groups"), re-mounting the memory controller after using it is very likely to hang. The cgroup core assumes that any remaining references after deleting a cgroup are temporary in nature, and synchroneously waits for them, but the above-mentioned commit has left-over page cache pin its css until it is reclaimed naturally. That being said, swap entries and charged kernel memory have been doing the same indefinite pinning forever, the bug is just more likely to trigger with left-over page cache. Reparenting kernel memory is highly impractical, which leaves changing the cgroup assumptions to reflect this: once a controller has been mounted and used, it has internal state that is independent from mount and cgroup lifetime. It can be unmounted and remounted, but it can't be reconfigured during subsequent mounts. Don't offline the controller root as long as there are any children, dead or alive. A remount will no longer wait for these old references to drain, it will simply mount the persistent controller state again. Reported-by: "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> Reported-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/bpf')
0 files changed, 0 insertions, 0 deletions