Commit a181b0e888a1d917edcab57cd73ccf7d8e75a46c

Authored by KAMEZAWA Hiroyuki
Committed by Linus Torvalds
1 parent 7759fc9d10

memcg: make global var read_mostly

mem_cgroup_subsys and page_cgroup_cache should be read_mostly and
MEM_CGROUP_RECLAIM_RETRIES can be just a fixed number.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

... ... @@ -35,9 +35,9 @@
35 35  
36 36 #include <asm/uaccess.h>
37 37  
38   -struct cgroup_subsys mem_cgroup_subsys;
39   -static const int MEM_CGROUP_RECLAIM_RETRIES = 5;
40   -static struct kmem_cache *page_cgroup_cache;
  38 +struct cgroup_subsys mem_cgroup_subsys __read_mostly;
  39 +static struct kmem_cache *page_cgroup_cache __read_mostly;
  40 +#define MEM_CGROUP_RECLAIM_RETRIES 5
41 41  
42 42 /*
43 43 * Statistics for memory cgroup.