From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>,
Rik van Riel <riel@redhat.com>,
Larry Woodman <lwoodman@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time.
Date: Wed, 7 Apr 2010 10:33:09 +0200 [thread overview]
Message-ID: <20100407083309.GC2446@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20100407171113.1029d6d4.kamezawa.hiroyu@jp.fujitsu.com>
On Wed, Apr 07, 2010 at 05:11:13PM +0900, KAMEZAWA Hiroyuki wrote:
> On Wed, 7 Apr 2010 10:00:14 +0200
> Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> > Probably a stupid question: but isn't it possible to allocate the huge
> > amounts of memory only if somebody activates memcg during runtime?
>
> Activation can occur only at boot but page_cgroup allocation happens at
> memory hotplug.
>
> > And then allocate everything using vmalloc?
> No.
>
> > But that probably doesn't work, since you need to record everything
> > from the boot of the system, I would guess?
>
> The story was..
>
> 1. at first, page_cgroup was allocated on demand. but we need to have
> page->page_cgroup pointer. Then, we pay 8bytes per page even if we
> disable memory cgroup.
> All page behavior was tracked since boot time.
>
> 2. Fedora maintaienr said "we never enable memcg if you contiue to use
> page->page_cgroup pointer, 8bytes per page costs!".
> Then, we decieded to allocate page_cgroup at boot time, and allocate
> all at once at boot time. This makes memcg runtime robust. And we
> got rid of page->page_cgroup pointer.
> cgroup_disable=memory user have no waste of memory now.
>
> > Just wondering because we do everything to not even waste a single bit
> > in struct page and all of a sudden on the enterprise distros we allocate
> > (by default!) 40 additional bytes per page.
>
> 3. Then, I added warning when I wrote a patch to allocate page_cgroup at boot.
> It's easy to avoid extra 40bytes.
> For enterprise, I have no concern. Enterprise admin tend to be careful and
> check all default value when he use a new kernel.
> That message was for desktop guys using desktop distro.
>
> Disabling memory cgroup at default may be a choice. But no one send such kind
> of patch until now.
Thanks for explaining! Looks like whatever you do there's always somebody
who complains.
Distros _could_ ship with memcg by default off independently of the upstream
kernel. But it looks like they won't. Anyway that's a problem we can't solve
here.
next prev parent reply other threads:[~2010-04-07 8:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-31 15:28 Larry Woodman
2010-03-31 15:54 ` Larry Woodman
2010-03-31 17:57 ` Rik van Riel
2010-04-01 1:48 ` KAMEZAWA Hiroyuki
2010-04-01 4:53 ` Balbir Singh
2010-04-07 8:00 ` Heiko Carstens
2010-04-07 8:11 ` KAMEZAWA Hiroyuki
2010-04-07 8:33 ` Heiko Carstens [this message]
2010-04-01 1:12 ` Daisuke Nishimura
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=20100407083309.GC2446@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lwoodman@redhat.com \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=riel@redhat.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
Powered by JetHome