From: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
To: Nikolay Borisov <n.borisov-/eCPMmvKun9pLGFMi4vTTA@public.gmane.org>
Cc: Michal Hocko <mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Access rules for current->memcg
Date: Tue, 21 Jul 2015 05:24:11 -0400 [thread overview]
Message-ID: <20150721092411.GA12570@cmpxchg.org> (raw)
In-Reply-To: <55AE0C18.5000304-/eCPMmvKun9pLGFMi4vTTA@public.gmane.org>
On Tue, Jul 21, 2015 at 12:08:40PM +0300, Nikolay Borisov wrote:
> On 07/21/2015 10:48 AM, Michal Hocko wrote:
> > On Mon 20-07-15 14:22:32, Nikolay Borisov wrote:
> >> What about memsw.limit_in_bytes - memory.limit_in_bytes for the total swap
> >
> > No this is not how the swap extension works. memsw counter covers
> > usage+swap. You can have up to memsw.limit_in_bytes swapped out. So
>
> I think you are wrong with that assumption. According to the
> documentation here:
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-memory.html
> (the box titled "Setting the memory.memsw.limit_in_bytes and
> memory.limit_in_bytes parameters") it seems that the space that could be
> swapped is actually memsw.limit_in_bytes - memory.limit_in_bytes.
>
> The way I understand is you will only start swapping after the limit in
> memory.limit_in_bytes has been exhausted and you will be able to swap
> only until memsw.limit_in_bytes is exhausted (but since
> memory.usage_in_bytes is already calculated in, which would equal to
> memory.limit_in_bytes in a memory pressure situation) you effectively
> have memsw.limit_in_bytes - memory.limit_in_bytes, no?
No, the cgroup can also swap due to global/parental memory pressure,
not just due to memory.limit_in_bytes. In that case, it can get its
pages swapped out until it reaches memsw.limit_in_bytes, with memory
consumption well below memory.limit or even 0.
next prev parent reply other threads:[~2015-07-21 9:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 13:34 Access rules for current->memcg Nikolay Borisov
[not found] ` <55A7B2D0.1030506-/eCPMmvKun9pLGFMi4vTTA@public.gmane.org>
2015-07-16 14:59 ` Michal Hocko
[not found] ` <20150716145902.GA10758-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-07-16 15:11 ` Nikolay Borisov
[not found] ` <55A7C9B4.3010907-/eCPMmvKun9pLGFMi4vTTA@public.gmane.org>
2015-07-16 15:22 ` Michal Hocko
[not found] ` <20150716152239.GA22529-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-07-16 21:21 ` Nikolay Borisov
[not found] ` <CAJFSNy6sLX82+3ZW_COr__pDTd9aSGgL1bjryMKKcVPhEN0F9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-17 7:13 ` Michal Hocko
[not found] ` <20150717071339.GA24787-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-07-17 7:16 ` Nikolay Borisov
[not found] ` <55A8ABC9.7090701-/eCPMmvKun9pLGFMi4vTTA@public.gmane.org>
2015-07-20 11:17 ` Michal Hocko
[not found] ` <20150720111707.GE1211-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-07-20 11:22 ` Nikolay Borisov
[not found] ` <55ACD9F8.2040802-/eCPMmvKun9pLGFMi4vTTA@public.gmane.org>
2015-07-21 7:48 ` Michal Hocko
[not found] ` <20150721074834.GF11967-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-07-21 9:08 ` Nikolay Borisov
[not found] ` <55AE0C18.5000304-/eCPMmvKun9pLGFMi4vTTA@public.gmane.org>
2015-07-21 9:24 ` Johannes Weiner [this message]
2015-07-21 9:48 ` Michal Hocko
[not found] ` <20150721094832.GI11967-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-07-21 10:32 ` Nikolay Borisov
[not found] ` <55AE1FB7.8050107-/eCPMmvKun9pLGFMi4vTTA@public.gmane.org>
2015-07-21 12:25 ` Michal Hocko
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=20150721092411.GA12570@cmpxchg.org \
--to=hannes-druugvl0lcnafugrpc6u6w@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=n.borisov-/eCPMmvKun9pLGFMi4vTTA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.