From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail190.messagelabs.com (mail190.messagelabs.com [216.82.249.51]) by kanga.kvack.org (Postfix) with SMTP id E7F276B0099 for ; Fri, 25 Sep 2009 04:27:16 -0400 (EDT) Received: from m6.gw.fujitsu.co.jp ([10.0.50.76]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n8P8RNxs023429 for (envelope-from kamezawa.hiroyu@jp.fujitsu.com); Fri, 25 Sep 2009 17:27:24 +0900 Received: from smail (m6 [127.0.0.1]) by outgoing.m6.gw.fujitsu.co.jp (Postfix) with ESMTP id 778F245DE51 for ; Fri, 25 Sep 2009 17:27:23 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (s6.gw.fujitsu.co.jp [10.0.50.96]) by m6.gw.fujitsu.co.jp (Postfix) with ESMTP id 4EFF445DE4C for ; Fri, 25 Sep 2009 17:27:23 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id 2B833E0800B for ; Fri, 25 Sep 2009 17:27:23 +0900 (JST) Received: from ml14.s.css.fujitsu.com (ml14.s.css.fujitsu.com [10.249.87.104]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id B69C2E08007 for ; Fri, 25 Sep 2009 17:27:22 +0900 (JST) Date: Fri, 25 Sep 2009 17:25:15 +0900 From: KAMEZAWA Hiroyuki Subject: [RFC][PATCH 6/10] memcg: remove unsued macros Message-Id: <20090925172515.9978b7d2.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20090925171721.b1bbbbe2.kamezawa.hiroyu@jp.fujitsu.com> References: <20090925171721.b1bbbbe2.kamezawa.hiroyu@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: KAMEZAWA Hiroyuki Cc: "linux-mm@kvack.org" , "balbir@linux.vnet.ibm.com" , "nishimura@mxp.nes.nec.co.jp" List-ID: From: KAMEZAWA Hiroyuki This patch removes unused macro/enum from memcontol.c and adds more commenary on charge_type enum definition. Signed-off-by: KAMEZAWA Hiroyuki --- mm/memcontrol.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) Index: temp-mmotm/mm/memcontrol.c =================================================================== --- temp-mmotm.orig/mm/memcontrol.c +++ temp-mmotm/mm/memcontrol.c @@ -189,24 +189,21 @@ struct mem_cgroup { struct mem_cgroup_stat stat; }; - +/* + * Types of charge/uncharge. memcg's behavior is depends on these types. + * SWAPOUT is for mem+swap accounting. It's used when a page is dropped + * from memory but there is a valid reference in swap. DROP means + * a page is removed from swap cache and no reference from swap itself. + */ enum charge_type { - MEM_CGROUP_CHARGE_TYPE_CACHE = 0, - MEM_CGROUP_CHARGE_TYPE_MAPPED, + MEM_CGROUP_CHARGE_TYPE_CACHE = 0, /* charge from file cache */ + MEM_CGROUP_CHARGE_TYPE_MAPPED, /* charge from anonymoys memory */ MEM_CGROUP_CHARGE_TYPE_SHMEM, /* used by page migration of shmem */ - MEM_CGROUP_CHARGE_TYPE_FORCE, /* used by force_empty */ MEM_CGROUP_CHARGE_TYPE_SWAPOUT, /* for accounting swapcache */ MEM_CGROUP_CHARGE_TYPE_DROP, /* a page was unused swap cache */ NR_CHARGE_TYPE, }; -/* only for here (for easy reading.) */ -#define PCGF_CACHE (1UL << PCG_CACHE) -#define PCGF_USED (1UL << PCG_USED) -#define PCGF_LOCK (1UL << PCG_LOCK) -/* Not used, but added here for completeness */ -#define PCGF_ACCT (1UL << PCG_ACCT) - /* for encoding cft->private value on file */ #define _MEM (0) #define _MEMSWAP (1) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org