linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Vladimir Davydov <vdavydov@parallels.com>
Cc: linux-kernel@vger.kernel.org, Michal Hocko <mhocko@suse.cz>,
	Greg Thelen <gthelen@google.com>, Tejun Heo <tj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org
Subject: Re: [RFC PATCH 1/2] memcg: account swap instead of memory+swap
Date: Sun, 28 Dec 2014 14:00:20 -0500	[thread overview]
Message-ID: <20141228190020.GA9385@phnom.home.cmpxchg.org> (raw)
In-Reply-To: <dd99dc0de2ce6fd9aa18b25851819b71a58dca7d.1419782051.git.vdavydov@parallels.com>

On Sun, Dec 28, 2014 at 07:19:12PM +0300, Vladimir Davydov wrote:
> The design of swap limits for memory cgroups looks broken. Instead of a
> separate swap limit, there is the memory.memsw.limit_in_bytes knob,
> which limits total memory+swap consumption. As a result, under global
> memory pressure, a cgroup can eat up to memsw.limit of *swap*, so it's
> just impossible to set the swap limit to be less than the memory limit
> with such a design. In particular, this means that we have to leave swap
> unlimited if we want to partition system memory dynamically using soft
> limits.
> 
> This patch therefore attempts to move from memory+swap to pure swap
> accounting so that we will be able to separate memory and swap resources
> in the sane cgroup hierarchy, which is the business of the following
> patch.
> 
> The old interface acts on memory and swap limits as follows:

The implementation seems fine to me, but there is no point in cramming
this into the old interface.  Let's just leave it alone and implement
proper swap accounting and limiting in the default/unified hierarchy.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2014-12-28 19:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-28 16:19 Vladimir Davydov
2014-12-28 16:19 ` [RFC PATCH 2/2] memcg: add memory and swap knobs to the default cgroup hierarchy Vladimir Davydov
2014-12-28 20:30   ` Johannes Weiner
2014-12-29  8:54     ` Vladimir Davydov
2014-12-28 19:00 ` Johannes Weiner [this message]
2014-12-29  8:47   ` [RFC PATCH 1/2] memcg: account swap instead of memory+swap Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141228190020.GA9385@phnom.home.cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=gthelen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=tj@kernel.org \
    --cc=vdavydov@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox