From: Tejun Heo <tj@kernel.org>
To: Roman Gushchin <guro@fb.com>
Cc: linux-mm@kvack.org, Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Kravetz <mike.kravetz@oracle.com>,
Dave Hansen <dave.hansen@intel.com>,
kernel-team@fb.com, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] memcg: hugetlbfs basic usage accounting
Date: Tue, 14 Nov 2017 13:06:07 -0800 [thread overview]
Message-ID: <20171114210607.GT983427@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <20171114172429.8916-1-guro@fb.com>
On Tue, Nov 14, 2017 at 05:24:29PM +0000, Roman Gushchin wrote:
> This patch implements basic accounting of memory consumption
> by hugetlbfs pages for cgroup v2 memory controller.
>
> Cgroup v2 memory controller lacks any visibility into the
> hugetlbfs memory consumption. Cgroup v1 implemented a separate
> hugetlbfs controller, which provided such stats, and also
> provided some control abilities. Although porting of the
> hugetlbfs controller to cgroup v2 is arguable a good idea and
> is outside of scope of this patch, it's very useful to have
> basic stats provided by memory.stat.
>
> As hugetlbfs memory can easily represent a big portion of total
> memory, it's important to understand who (which memcg/container)
> is using it.
>
> The number is represented in memory.stat as "hugetlb" in bytes and
> is printed unconditionally. Accounting code doesn't depend on
> cgroup v1 hugetlb controller.
>
> Example:
> $ cat /sys/fs/cgroup/user.slice/user-0.slice/session-1.scope/memory.stat
> anon 1634304
> file 1163264
> kernel_stack 16384
> slab 737280
> sock 0
> shmem 0
> file_mapped 32768
> file_dirty 4096
> file_writeback 0
> inactive_anon 0
> active_anon 1634304
> inactive_file 65536
> active_file 1097728
> unevictable 0
> slab_reclaimable 282624
> slab_unreclaimable 454656
> hugetlb 1073741824
> pgfault 4580
> pgmajfault 13
> ...
>
> Signed-off-by: Roman Gushchin <guro@fb.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Michal Hocko <mhocko@kernel.org>
> Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Mike Kravetz <mike.kravetz@oracle.com>
> Cc: Dave Hansen <dave.hansen@intel.com>
> Cc: kernel-team@fb.com
> Cc: cgroups@vger.kernel.org
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj@kernel.org>
To: Roman Gushchin <guro@fb.com>
Cc: linux-mm@kvack.org, Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Kravetz <mike.kravetz@oracle.com>,
Dave Hansen <dave.hansen@intel.com>,
kernel-team@fb.com, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] memcg: hugetlbfs basic usage accounting
Date: Tue, 14 Nov 2017 13:06:07 -0800 [thread overview]
Message-ID: <20171114210607.GT983427@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <20171114172429.8916-1-guro@fb.com>
On Tue, Nov 14, 2017 at 05:24:29PM +0000, Roman Gushchin wrote:
> This patch implements basic accounting of memory consumption
> by hugetlbfs pages for cgroup v2 memory controller.
>
> Cgroup v2 memory controller lacks any visibility into the
> hugetlbfs memory consumption. Cgroup v1 implemented a separate
> hugetlbfs controller, which provided such stats, and also
> provided some control abilities. Although porting of the
> hugetlbfs controller to cgroup v2 is arguable a good idea and
> is outside of scope of this patch, it's very useful to have
> basic stats provided by memory.stat.
>
> As hugetlbfs memory can easily represent a big portion of total
> memory, it's important to understand who (which memcg/container)
> is using it.
>
> The number is represented in memory.stat as "hugetlb" in bytes and
> is printed unconditionally. Accounting code doesn't depend on
> cgroup v1 hugetlb controller.
>
> Example:
> $ cat /sys/fs/cgroup/user.slice/user-0.slice/session-1.scope/memory.stat
> anon 1634304
> file 1163264
> kernel_stack 16384
> slab 737280
> sock 0
> shmem 0
> file_mapped 32768
> file_dirty 4096
> file_writeback 0
> inactive_anon 0
> active_anon 1634304
> inactive_file 65536
> active_file 1097728
> unevictable 0
> slab_reclaimable 282624
> slab_unreclaimable 454656
> hugetlb 1073741824
> pgfault 4580
> pgmajfault 13
> ...
>
> Signed-off-by: Roman Gushchin <guro@fb.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Michal Hocko <mhocko@kernel.org>
> Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Mike Kravetz <mike.kravetz@oracle.com>
> Cc: Dave Hansen <dave.hansen@intel.com>
> Cc: kernel-team@fb.com
> Cc: cgroups@vger.kernel.org
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
next prev parent reply other threads:[~2017-11-14 21:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 17:24 [PATCH] memcg: hugetlbfs basic usage accounting Roman Gushchin
2017-11-14 17:24 ` Roman Gushchin
2017-11-14 21:06 ` Tejun Heo [this message]
2017-11-14 21:06 ` Tejun Heo
2017-11-15 8:35 ` Michal Hocko
2017-11-15 8:35 ` Michal Hocko
2017-11-15 11:18 ` Roman Gushchin
2017-11-15 11:18 ` Roman Gushchin
2017-11-15 11:42 ` Michal Hocko
2017-11-15 11:42 ` Michal Hocko
2017-11-15 12:23 ` Roman Gushchin
2017-11-15 12:23 ` Roman Gushchin
2017-11-15 12:34 ` Michal Hocko
2017-11-15 12:34 ` Michal Hocko
2017-11-15 12:34 ` Michal Hocko
2017-11-15 12:15 ` Johannes Weiner
2017-11-15 12:15 ` Johannes Weiner
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=20171114210607.GT983427@devbig577.frc2.facebook.com \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=dave.hansen@intel.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--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 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.