From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Richard Weinberger <richard@nod.at>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: inux-next: Tree for Apr 27 (uml + mm/memcontrol.c)
Date: Fri, 27 Apr 2012 14:36:46 -0700 [thread overview]
Message-ID: <20120427143646.8209627e.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1204271420350.4631@chino.kir.corp.google.com>
On Fri, 27 Apr 2012 14:27:13 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:
> On Fri, 27 Apr 2012, Andrew Morton wrote:
>
> > Seems reasonable. But the CONFIG_HUGETLB_PAGE=y,
> > CONFIG_MEM_RES_CTLR_HUGETLB=n combination will cause unneeded code
> > generation and space consumption in memcontrol.c.
> >
> > I wonder if we can additionally do, within memcontrol.c:
> >
> > /*
> > * Nice comment goes here
> > */
> > #ifdef CONFIG_MEM_RES_CTLR_HUGETLB
> > #define HUGE_MAX_HSTATE_FOO HUGE_MAX_HSTATE
> > #else
> > #define HUGE_MAX_HSTATE_FOO 0
> > #endif
> >
> > and s/HUGE_MAX_HSTATE/HUGE_MAX_HSTATE_FOO/ in that file.
> >
>
> I haven't looked at the hugetlb memcg controller in-depth (yet), but I
> really think we should start considering breaking things like this off
> into its own cgroup. The hugetlb extension seems like something that
> could be easily separtated, but perhaps I'm saying "easily" because I
> haven't looked at the implementation.
>
> mm/memcontrol.c in linux-next is 5877 lines and, if history is any guide,
> it's going to continue growing.
>
> If the hugetlb usage isn't charged against the memcg's
> memory.usage_in_bytes like thp is, then I really think it should be its
> own cgroup. From the hugetlb perspective absent any cgroups, things like
> hstates (since we're talking about HUGE_MAX_HSTATE) are global resources
> and so you'd need to preallocate these on the command line or via sysfs
> before you could mmap them. So if my assumption that the hugetlb memcg
> controller is only governing these global resources and charging a set of
> tasks for what they use, then it really has no business in mm/memcontrol.c
> to begin with, in my opinion.
Minor matter: that's non-responsive to my suggestion.
Major matter: that's a big fat nack to this patchset:
hugetlb-rename-max_hstate-to-hugetlb_max_hstate.patch
hugetlbfs-dont-use-err_ptr-with-vm_fault-values.patch
hugetlbfs-add-an-inline-helper-for-finding-hstate-index.patch
hugetlb-use-mmu_gather-instead-of-a-temporary-linked-list-for-accumulating-pages.patch
hugetlb-use-mmu_gather-instead-of-a-temporary-linked-list-for-accumulating-pages-fix.patch
hugetlb-use-mmu_gather-instead-of-a-temporary-linked-list-for-accumulating-pages-fix-fix.patch
hugetlb-avoid-taking-i_mmap_mutex-in-unmap_single_vma-for-hugetlb.patch
hugetlb-simplify-migrate_huge_page.patch
memcg-add-hugetlb-extension.patch
memcg-add-hugetlb-extension-fix.patch
hugetlb-add-charge-uncharge-calls-for-hugetlb-alloc-free.patch
memcg-track-resource-index-in-cftype-private.patch
hugetlbfs-add-memcg-control-files-for-hugetlbfs.patch
hugetlbfs-add-memcg-control-files-for-hugetlbfs-use-scnprintf-instead-of-sprintf.patch
hugetlbfs-add-memcg-control-files-for-hugetlbfs-use-scnprintf-instead-of-sprintf-fix.patch
hugetlbfs-add-a-list-for-tracking-in-use-hugetlb-pages.patch
memcg-move-hugetlb-resource-count-to-parent-cgroup-on-memcg-removal.patch
memcg-move-hugetlb-resource-count-to-parent-cgroup-on-memcg-removal-fix.patch
memcg-move-hugetlb-resource-count-to-parent-cgroup-on-memcg-removal-fix-fix.patch
hugetlb-migrate-memcg-info-from-oldpage-to-new-page-during-migration.patch
hugetlb-migrate-memcg-info-from-oldpage-to-new-page-during-migration-fix.patch
memcg-add-memory-controller-documentation-for-hugetlb-management.patch
so please take it up at a convenient time, in the appropriate
thread, with the appropriate cc's!
next prev parent reply other threads:[~2012-04-27 21:36 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 6:11 inux-next: Tree for Apr 27 Stephen Rothwell
2012-04-27 15:47 ` inux-next: Tree for Apr 27 (uml + mm/memcontrol.c) Randy Dunlap
2012-04-27 18:44 ` David Rientjes
2012-04-27 20:23 ` Andrew Morton
2012-04-27 21:27 ` David Rientjes
2012-04-27 21:36 ` Andrew Morton [this message]
2012-04-27 23:14 ` David Rientjes
2012-04-27 23:24 ` Andrew Morton
2012-04-27 23:52 ` David Rientjes
2012-04-28 18:01 ` Aneesh Kumar K.V
2012-05-03 9:13 ` David Rientjes
2012-05-03 10:30 ` Hiroyuki Kamezawa
2012-05-03 20:56 ` David Rientjes
2012-05-03 21:57 ` David Rientjes
2012-05-03 23:21 ` Hiroyuki Kamezawa
2012-05-03 23:33 ` Hiroyuki Kamezawa
2012-05-04 18:29 ` Aneesh Kumar K.V
2012-05-03 23:17 ` Hiroyuki Kamezawa
2012-05-04 17:24 ` Tejun Heo
2012-05-07 14:01 ` Michal Hocko
2012-05-07 17:08 ` Tejun Heo
2012-05-08 10:48 ` Michal Hocko
2012-05-03 13:54 ` Aneesh Kumar K.V
2012-05-03 20:39 ` David Rientjes
2012-04-28 0:45 ` Randy Dunlap
[not found] ` <20120427161146.95422142968526faaff615d4-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2012-04-27 16:56 ` inux-next: Tree for Apr 27 (infiniband/hw/ocrdma) Randy Dunlap
[not found] ` <4F9ACFC4.6010002-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>
2012-04-27 23:54 ` Roland Dreier
2012-05-02 22:51 ` [PATCH] RDMA/ocrdma: Fix build with IPV6=n Roland Dreier
[not found] ` <1335999060-23779-1-git-send-email-roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-05-03 0:29 ` Randy Dunlap
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=20120427143646.8209627e.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=richard@nod.at \
--cc=rientjes@google.com \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).