Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752716AbbLKTnK (ORCPT ); Fri, 11 Dec 2015 14:43:10 -0500 Received: from gum.cmpxchg.org ([85.214.110.215]:49232 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197AbbLKTnI (ORCPT ); Fri, 11 Dec 2015 14:43:08 -0500 Date: Fri, 11 Dec 2015 14:42:54 -0500 From: Johannes Weiner To: Vladimir Davydov Cc: Andrew Morton , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 7/7] Documentation: cgroup: add memory.swap.{current,max} description Message-ID: <20151211194254.GF3773@cmpxchg.org> References: <24930f544e7e98a23a17c9adcacb9397b1b8cae7.1449742561.git.vdavydov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24930f544e7e98a23a17c9adcacb9397b1b8cae7.1449742561.git.vdavydov@virtuozzo.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1833 Lines: 43 On Thu, Dec 10, 2015 at 02:39:20PM +0300, Vladimir Davydov wrote: > Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/