linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Shakeel Butt <shakeelb@google.com>
Cc: Yafang Shao <laoar.shao@gmail.com>, Roman Gushchin <guro@fb.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	Tejun Heo <tj@kernel.org>,
	khlebnikov@yandex-team.ru, mka@chromium.org,
	Hugh Dickins <hughd@google.com>,
	Cgroups <cgroups@vger.kernel.org>, Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/shmem: set default tmpfs size according to memcg limit
Date: Mon, 20 Nov 2017 13:04:22 +0100	[thread overview]
Message-ID: <20171120120422.a6r4govoyxjbgp7w@dhcp22.suse.cz> (raw)
In-Reply-To: <CALvZod6=-dxhaeQMEBwJ5o6iyVhvQ_jdNck-yWncFVRvkb1YXQ@mail.gmail.com>

On Fri 17-11-17 09:49:54, Shakeel Butt wrote:
> On Fri, Nov 17, 2017 at 9:41 AM, Yafang Shao <laoar.shao@gmail.com> wrote:
[...]
> > Of couse that is the best way.
> > But we can not ensue all applications will do it.
> > That's why I introduce a proper defalut value for them.
> >
> 
> I think we disagree on the how to get proper default value. Unless you
> can restrict that all the memory allocated for a tmpfs mount will be
> charged to a specific memcg, you should not just pick limit of the
> memcg of the process mounting the tmpfs to set the default of tmpfs
> mount. If you can restrict tmpfs charging to a specific memcg then the
> limit of that memcg should be used to set the default of the tmpfs
> mount. However this feature is not present in the upstream kernel at
> the moment (We have this feature in our local kernel and I am planning
> to upstream that).

I think the whole problem is that containers pretend to be independent
while they share a non-reclaimable resource. Fix this and you will not
have a problem. I am afraid that the only real fix is to make tmpfs
private per container instance and that is something you can easily
achieve in the userspace.

-- 
Michal Hocko
SUSE Labs

--
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:[~2017-11-20 12:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17  3:09 Yafang Shao
2017-11-17  4:43 ` Shakeel Butt
2017-11-17  6:41   ` Yafang Shao
2017-11-17 15:55   ` Roman Gushchin
2017-11-17 16:20     ` Yafang Shao
2017-11-17 16:45       ` Roman Gushchin
2017-11-17 17:09         ` Yafang Shao
2017-11-17 17:35           ` Shakeel Butt
2017-11-17 17:41             ` Yafang Shao
2017-11-17 17:49               ` Shakeel Butt
2017-11-18  2:29                 ` Yafang Shao
2017-11-20 12:04                 ` Michal Hocko [this message]
2017-11-20 12:16                   ` Yafang Shao
2017-11-20 12:39                     ` Michal Hocko
2017-11-20 13:05                       ` Yafang Shao

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=20171120120422.a6r4govoyxjbgp7w@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=khlebnikov@yandex-team.ru \
    --cc=laoar.shao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mka@chromium.org \
    --cc=shakeelb@google.com \
    --cc=tj@kernel.org \
    --cc=vdavydov.dev@gmail.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