On Thu, Dec 10, 2015 at 02:39:20PM +0300, Vladimir Davydov wrote: > Signed-off-by: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx> Can we include a blurb for R-5-1 of cgroups.txt as well to explain why cgroup2 has a new swap interface? I had already written something up in the past, pasted below, feel free to use it if you like. Otherwise, you had pretty good reasons in your swap controller changelog as well. --- - The combined memory+swap accounting and limiting is replaced by real control over swap space. memory.swap.current The amount memory of this subtree that has been swapped to disk. memory.swap.max The maximum amount of memory this subtree is allowed to swap to disk. The main argument for a combined memory+swap facility in the original cgroup design was that global or parental pressure would always be able to swap all anonymous memory of a child group, regardless of the child's own (possibly untrusted) configuration. However, untrusted groups can sabotage swapping by other means--such as referencing its anonymous memory in a tight loop--and an admin can not assume full swappability when overcommitting untrusted jobs. For trusted jobs, on the other hand, a combined counter is not an intuitive userspace interface, and it flies in the face of the idea that cgroup controllers should account and limit specific physical resources. Swap space is a resource like all others in the system, and that's why unified hierarchy allows distributing it separately. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>