Commit 627991a2 authored by KAMEZAWA Hiroyuki's avatar KAMEZAWA Hiroyuki Committed by Linus Torvalds

memcg: remove redundant message at swapon

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: default avatarHugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a3b2d692
...@@ -597,6 +597,8 @@ config CGROUP_MEM_RES_CTLR_SWAP ...@@ -597,6 +597,8 @@ config CGROUP_MEM_RES_CTLR_SWAP
is disabled by boot option, this will be automatically disabled and 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, 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. 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 endif # CGROUPS
......
...@@ -426,13 +426,6 @@ int swap_cgroup_swapon(int type, unsigned long max_pages) ...@@ -426,13 +426,6 @@ int swap_cgroup_swapon(int type, unsigned long max_pages)
} }
mutex_unlock(&swap_cgroup_mutex); 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; return 0;
nomem: nomem:
printk(KERN_INFO "couldn't allocate enough memory for swap_cgroup.\n"); printk(KERN_INFO "couldn't allocate enough memory for swap_cgroup.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment