lkml.org 
[lkml]   [2008]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] memcg: make global var to be read_mostly
An easy cut out from memcg: performance improvement patch set.
Tested on: x86-64/linux-2.6.26-rc1-git6

Thanks,
-Kame

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

Changelog:
* makes MEM_CGROUP_RECLAIM_RETRIES to be a macro

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



Index: linux-2.6.26-rc1/mm/memcontrol.c
===================================================================
--- linux-2.6.26-rc1.orig/mm/memcontrol.c
+++ linux-2.6.26-rc1/mm/memcontrol.c
@@ -35,9 +35,9 @@

#include <asm/uaccess.h>

-struct cgroup_subsys mem_cgroup_subsys;
-static const int MEM_CGROUP_RECLAIM_RETRIES = 5;
-static struct kmem_cache *page_cgroup_cache;
+struct cgroup_subsys mem_cgroup_subsys __read_mostly;
+static struct kmem_cache *page_cgroup_cache __read_mostly;
+#define MEM_CGROUP_RECLAIM_RETRIES 5

/*
* Statistics for memory cgroup.


\
 
 \ /
  Last update: 2008-05-09 07:55    [W:0.042 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site