public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux•vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation•org>,
	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>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp•fujitsu.com>
Subject: Re: inux-next: Tree for Apr 27 (uml + mm/memcontrol.c)
Date: Sat, 28 Apr 2012 23:31:45 +0530	[thread overview]
Message-ID: <87fwbnag6u.fsf@skywalker.in.ibm.com> (raw)
In-Reply-To: <20120427143646.8209627e.akpm@linux-foundation.org>

Andrew Morton <akpm@linux-foundation•org> writes:

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

My first version was to do it as a seperate controller 

http://thread.gmane.org/gmane.linux.kernel.mm/73826

But the feedback I received was to do it as a part of memcg extension,
because what the controller is limiting is memory albeit a different
type. AFAIU there is also this goal of avoiding controller proliferation.

-aneesh

  parent reply	other threads:[~2012-04-28 18:01 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
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 [this message]
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=87fwbnag6u.fsf@skywalker.in.ibm.com \
    --to=aneesh.kumar@linux$(echo .)vnet.ibm.com \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=kamezawa.hiroyu@jp$(echo .)fujitsu.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=rdunlap@xenotime$(echo .)net \
    --cc=richard@nod$(echo .)at \
    --cc=rientjes@google$(echo .)com \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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