lkml.org 
[lkml]   [2015]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/7] Documentation: cgroup: add memory.swap.{current,max} description
On Thu, Dec 10, 2015 at 02:39:20PM +0300, Vladimir Davydov wrote:
> Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

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.


\
 
 \ /
  Last update: 2015-12-11 21:01    [W:0.096 / U:1.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site