[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20090319094433.709edb9e.kamezawa.hiroyu@jp.fujitsu.com>
Date: Thu, 19 Mar 2009 09:44:33 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Hugh Dickins <hugh@...itas.com>
Cc: nishimura@....nes.nec.co.jp,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
balbir@...ux.vnet.ibm.com, lizf@...fujitsu.com,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] memcg remvoe redundant message at swapon
This is based on this thread http://marc.info/?l=linux-mm&m=123724233418715&w=2
against the mmotm.
=
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
It's pointed out that swap_cgroup's message at swapon() is nonsense.
Because
* It can be calculated very easily if all necessary information is
written in Kconfig.
* It's not necessary to annoying people at every swapon().
In other view, now, memory usage per swp_entry is reduced to 2bytes
from 8bytes(64bit) and I think it's reasonably small.
Reported-by: Hugh Dickins <hugh@...itas.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
---
Index: mmotm-2.6.29-Mar11/mm/page_cgroup.c
===================================================================
--- mmotm-2.6.29-Mar11.orig/mm/page_cgroup.c
+++ mmotm-2.6.29-Mar11/mm/page_cgroup.c
@@ -426,13 +426,6 @@ int swap_cgroup_swapon(int type, unsigne
}
mutex_unlock(&swap_cgroup_mutex);
- printk(KERN_INFO
- "swap_cgroup: uses %ld bytes of vmalloc for pointer array space"
- " and %ld bytes to hold mem_cgroup information per swap ents\n",
- array_size, length * PAGE_SIZE);
- printk(KERN_INFO
- "swap_cgroup can be disabled by noswapaccount boot option.\n");
-
return 0;
nomem:
printk(KERN_INFO "couldn't allocate enough memory for swap_cgroup.\n");
Index: mmotm-2.6.29-Mar11/init/Kconfig
===================================================================
--- mmotm-2.6.29-Mar11.orig/init/Kconfig
+++ mmotm-2.6.29-Mar11/init/Kconfig
@@ -603,6 +603,8 @@ config CGROUP_MEM_RES_CTLR_SWAP
is disabled by boot option, this will be automatically disabled and
there will be no overhead from this. Even when you set this config=y,
if boot option "noswapaccount" is set, swap will not be accounted.
+ Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
+ size is 4096bytes, 512k per 1Gbytes of swap.
endif # CGROUPS
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists