linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Roman Gushchin <guro@fb.com>
To: lsf-pc@lists.linux-foundation.org
Cc: linux-mm@kvack.org
Subject: [LSF/MM ATTEND] memory.low hierarchic semantics
Date: Tue, 30 Jan 2018 20:57:12 +0000	[thread overview]
Message-ID: <20180130205711.GA21066@castle.DHCP.thefacebook.com> (raw)

Hello!

Current semantics of memory.low makes it hard to use in a hierarchy,
where some memcg's are more valuable than others. For instance,
let's say we have memcgs A, A/B and A/C; A/B should have 10Gb
of guaranteed memory, a A/C is expected to use the surplus
on the machine.
The question is what should we set as the A/memory.low value?

  A      A/memory.low ???
 / \
B   C    B/memory.low = 10G, C/memory.low = 0


If we set it to 10G (the minimum reasonable number), B's memory guarantee
will not work until sum of B and C memory consumption will reach 10G.
And it might be by far below 10G, which makes no sense. The only case,
when it might work, is when there is only one leaf cgroup in the sub-tree.

The only other option I see is to set it to 'max'. Then B's memory
guarantee will work as expected. But this basically means that all non-leaf
memcgs must have memory.low set to 'max', otherwise leaf's memory.low have
no meaning. Such approach makes impossible protecting the system from the
misbehavior in case of sub-tree delegation.

I have no solution for the described problem, but I believe that we should
somehow scale the memory pressure on B and C, depending on how much
their usage exceeds their guarantees. Another option is to scan only those
children memcgs, which are above their guarantees, until the are some
(as we do for memory.low in general).

It will be very valuable to discuss this problem and try to find a possible
approach to it, which will make sense semantically and be acceptable
in terms of performance.


Thanks!


Roman

--
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>

                 reply	other threads:[~2018-01-30 20:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20180130205711.GA21066@castle.DHCP.thefacebook.com \
    --to=guro@fb.com \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    /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