All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time.
@ 2010-03-31 15:28 Larry Woodman
  2010-03-31 15:54 ` Larry Woodman
  0 siblings, 1 reply; 9+ messages in thread
From: Larry Woodman @ 2010-03-31 15:28 UTC (permalink / raw)
  To: linux-kernel

We are considering removing this printk at boot time from RHEL because
it will confuse customers, encourage them to change the boot parameters
and generate extraneous support calls.  Its documented in
Documentation/kernel-parameters.txt anyway.  Any thoughts???

Larry Woodman



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time.
  2010-03-31 15:28 RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time Larry Woodman
@ 2010-03-31 15:54 ` Larry Woodman
  2010-03-31 17:57   ` Rik van Riel
  2010-04-01  1:12   ` Daisuke Nishimura
  0 siblings, 2 replies; 9+ messages in thread
From: Larry Woodman @ 2010-03-31 15:54 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

On Wed, 2010-03-31 at 11:28 -0400, Larry Woodman wrote:
> We are considering removing this printk at boot time from RHEL because
> it will confuse customers, encourage them to change the boot parameters
> and generate extraneous support calls.  Its documented in
> Documentation/kernel-parameters.txt anyway.  Any thoughts???
> 
> Larry Woodman
> 

OOPS, sorry to attach the patch:



[-- Attachment #2: rhel6-cgroup.patch --]
[-- Type: text/x-patch, Size: 459 bytes --]

diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 3d535d5..2029fae 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -83,8 +83,6 @@ void __init page_cgroup_init_flatmem(void)
 			goto fail;
 	}
 	printk(KERN_INFO "allocated %ld bytes of page_cgroup\n", total_usage);
-	printk(KERN_INFO "please try 'cgroup_disable=memory' option if you"
-	" don't want memory cgroups\n");
 	return;
 fail:
 	printk(KERN_CRIT "allocation of page_cgroup failed.\n");

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time.
  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  1:12   ` Daisuke Nishimura
  1 sibling, 1 reply; 9+ messages in thread
From: Rik van Riel @ 2010-03-31 17:57 UTC (permalink / raw)
  To: Larry Woodman; +Cc: linux-kernel

On 03/31/2010 11:54 AM, Larry Woodman wrote:
> On Wed, 2010-03-31 at 11:28 -0400, Larry Woodman wrote:
>> We are considering removing this printk at boot time from RHEL because
>> it will confuse customers, encourage them to change the boot parameters
>> and generate extraneous support calls.  Its documented in
>> Documentation/kernel-parameters.txt anyway.  Any thoughts???

Yeah, that is a strange boot message...

Acked-by: Rik van Riel <riel@redhat.com>

> OOPS, sorry to attach the patch:
>
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time.
  2010-03-31 15:54 ` Larry Woodman
  2010-03-31 17:57   ` Rik van Riel
@ 2010-04-01  1:12   ` Daisuke Nishimura
  1 sibling, 0 replies; 9+ messages in thread
From: Daisuke Nishimura @ 2010-04-01  1:12 UTC (permalink / raw)
  To: Larry Woodman
  Cc: linux-kernel, Balbir Singh, KAMEZAWA Hiroyuki, Daisuke Nishimura

(Added related people to Cc list.)

On Wed, 31 Mar 2010 11:54:59 -0400, Larry Woodman <lwoodman@redhat.com> wrote:
> On Wed, 2010-03-31 at 11:28 -0400, Larry Woodman wrote:
> > We are considering removing this printk at boot time from RHEL because
> > it will confuse customers, encourage them to change the boot parameters
> > and generate extraneous support calls.  Its documented in
> > Documentation/kernel-parameters.txt anyway.  Any thoughts???
> > 
> > Larry Woodman
> > 
> 
I agree to removing this message.
We've already removed similar message about swap_cgroup in commit 627991a2.

	Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>

Thanks,
Daisuke Nishimura.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time.
  2010-03-31 17:57   ` Rik van Riel
@ 2010-04-01  1:48     ` KAMEZAWA Hiroyuki
  2010-04-01  4:53       ` Balbir Singh
  0 siblings, 1 reply; 9+ messages in thread
From: KAMEZAWA Hiroyuki @ 2010-04-01  1:48 UTC (permalink / raw)
  To: Rik van Riel
  Cc: Larry Woodman, linux-kernel, balbir, kamezawa.hiroyu, nishimura, akpm

On Wed, 31 Mar 2010 13:57:46 -0400
Rik van Riel <riel@redhat.com> wrote:

> On 03/31/2010 11:54 AM, Larry Woodman wrote:
> > On Wed, 2010-03-31 at 11:28 -0400, Larry Woodman wrote:
> >> We are considering removing this printk at boot time from RHEL because
> >> it will confuse customers, encourage them to change the boot parameters
> >> and generate extraneous support calls.  Its documented in
> >> Documentation/kernel-parameters.txt anyway.  Any thoughts???
> 
> Yeah, that is a strange boot message...
> 
> Acked-by: Rik van Riel <riel@redhat.com>
> 
please CC linux-mm and maintainers.

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

It have been there for a year and I think memory usage by page_cgroup
will not surprise linux kernel users, more.

Assume x86-32.

RHEL allows amount of memory up to 16G, right?

without memcg: memmap uses 32bytes * 16G/4k = 128M.
with memcg:    memmap+page_cgroup uses (32+20) bytes * 16G/4k = 208M.

I thought this may cause OOM in ZONE_NORMAL. Then, I added it when I wrote
original patch. This kind of memory eater can cause trouble when it pops
up suddenly. But I think 'one year' can be an excuse.

Thanks,
-Kame



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time.
  2010-04-01  1:48     ` KAMEZAWA Hiroyuki
@ 2010-04-01  4:53       ` Balbir Singh
  2010-04-07  8:00         ` Heiko Carstens
  0 siblings, 1 reply; 9+ messages in thread
From: Balbir Singh @ 2010-04-01  4:53 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki
  Cc: Rik van Riel, Larry Woodman, linux-kernel, nishimura, akpm

* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2010-04-01 10:48:59]:

> On Wed, 31 Mar 2010 13:57:46 -0400
> Rik van Riel <riel@redhat.com> wrote:
> 
> > On 03/31/2010 11:54 AM, Larry Woodman wrote:
> > > On Wed, 2010-03-31 at 11:28 -0400, Larry Woodman wrote:
> > >> We are considering removing this printk at boot time from RHEL because
> > >> it will confuse customers, encourage them to change the boot parameters
> > >> and generate extraneous support calls.  Its documented in
> > >> Documentation/kernel-parameters.txt anyway.  Any thoughts???
> > 
> > Yeah, that is a strange boot message...
> > 
> > Acked-by: Rik van Riel <riel@redhat.com>
> > 
> please CC linux-mm and maintainers.
> 
> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> 
> It have been there for a year and I think memory usage by page_cgroup
> will not surprise linux kernel users, more.
> 
> Assume x86-32.
> 
> RHEL allows amount of memory up to 16G, right?
> 
> without memcg: memmap uses 32bytes * 16G/4k = 128M.
> with memcg:    memmap+page_cgroup uses (32+20) bytes * 16G/4k = 208M.
> 
> I thought this may cause OOM in ZONE_NORMAL. Then, I added it when I wrote
> original patch. This kind of memory eater can cause trouble when it pops
> up suddenly. But I think 'one year' can be an excuse.
>

I've seen this issue come up on multiple machines, I think the printk
is useful. However, we might need to change the panic() to a big fat
warning and disable the memcg controller if we fail to allocate memory
in page_cgroup_init_flatmem(). 

-- 
	Three Cheers,
	Balbir

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time.
  2010-04-01  4:53       ` Balbir Singh
@ 2010-04-07  8:00         ` Heiko Carstens
  2010-04-07  8:11           ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 9+ messages in thread
From: Heiko Carstens @ 2010-04-07  8:00 UTC (permalink / raw)
  To: Balbir Singh
  Cc: KAMEZAWA Hiroyuki, Rik van Riel, Larry Woodman, linux-kernel,
	nishimura, akpm

On Thu, Apr 01, 2010 at 10:23:10AM +0530, Balbir Singh wrote:
> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2010-04-01 10:48:59]:
> 
> > On Wed, 31 Mar 2010 13:57:46 -0400
> > Rik van Riel <riel@redhat.com> wrote:
> > 
> > > On 03/31/2010 11:54 AM, Larry Woodman wrote:
> > > > On Wed, 2010-03-31 at 11:28 -0400, Larry Woodman wrote:
> > > >> We are considering removing this printk at boot time from RHEL because
> > > >> it will confuse customers, encourage them to change the boot parameters
> > > >> and generate extraneous support calls.  Its documented in
> > > >> Documentation/kernel-parameters.txt anyway.  Any thoughts???
> > > 
> > > Yeah, that is a strange boot message...
> > > 
> > > Acked-by: Rik van Riel <riel@redhat.com>
> > > 
> > please CC linux-mm and maintainers.
> > 
> > Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > 
> > It have been there for a year and I think memory usage by page_cgroup
> > will not surprise linux kernel users, more.
> > 
> > Assume x86-32.
> > 
> > RHEL allows amount of memory up to 16G, right?
> > 
> > without memcg: memmap uses 32bytes * 16G/4k = 128M.
> > with memcg:    memmap+page_cgroup uses (32+20) bytes * 16G/4k = 208M.
> > 
> > I thought this may cause OOM in ZONE_NORMAL. Then, I added it when I wrote
> > original patch. This kind of memory eater can cause trouble when it pops
> > up suddenly. But I think 'one year' can be an excuse.
> >
> 
> I've seen this issue come up on multiple machines, I think the printk
> is useful. However, we might need to change the panic() to a big fat
> warning and disable the memcg controller if we fail to allocate memory
> in page_cgroup_init_flatmem(). 

Probably a stupid question: but isn't it possible to allocate the huge
amounts of memory only if somebody activates memcg during runtime?
And then allocate everything using vmalloc?
But that probably doesn't work, since you need to record everything
from the boot of the system, I would guess?
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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time.
  2010-04-07  8:00         ` Heiko Carstens
@ 2010-04-07  8:11           ` KAMEZAWA Hiroyuki
  2010-04-07  8:33             ` Heiko Carstens
  0 siblings, 1 reply; 9+ messages in thread
From: KAMEZAWA Hiroyuki @ 2010-04-07  8:11 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Balbir Singh, Rik van Riel, Larry Woodman, linux-kernel, nishimura, akpm

On Wed, 7 Apr 2010 10:00:14 +0200
Heiko Carstens <heiko.carstens@de.ibm.com> wrote:

> On Thu, Apr 01, 2010 at 10:23:10AM +0530, Balbir Singh wrote:
> > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2010-04-01 10:48:59]:
> > I've seen this issue come up on multiple machines, I think the printk
> > is useful. However, we might need to change the panic() to a big fat
> > warning and disable the memcg controller if we fail to allocate memory
> > in page_cgroup_init_flatmem(). 
> 
> 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,
-Kame


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time.
  2010-04-07  8:11           ` KAMEZAWA Hiroyuki
@ 2010-04-07  8:33             ` Heiko Carstens
  0 siblings, 0 replies; 9+ messages in thread
From: Heiko Carstens @ 2010-04-07  8:33 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki
  Cc: Balbir Singh, Rik van Riel, Larry Woodman, linux-kernel, nishimura, akpm

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-04-07  8:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-31 15:28 RFC [Patch] Remove "please try 'cgroup_disable=memory' option if you don't want memory cgroups" printk at boot time 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
2010-04-01  1:12   ` Daisuke Nishimura

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.