Re: [-mm PATCH 6/9] Memory controller add per container LRU and reclaim (v4)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dhaval Giani
Date: Monday, July 30, 2007 - 6:37 am

Hi Balbir,

 

The spinlock is not annotated by lockdep. The following patch should do
it.

Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Signed-off-by: Gautham Shenoy R <ego@in.ibm.com>


Index: linux-2.6.23-rc1/mm/memcontrol.c
===================================================================
--- linux-2.6.23-rc1.orig/mm/memcontrol.c	2007-07-30 17:27:24.000000000 +0530
+++ linux-2.6.23-rc1/mm/memcontrol.c	2007-07-30 18:43:40.000000000 +0530
@@ -501,6 +501,9 @@
 
 static struct mem_container init_mem_container;
 
+/* lockdep should know about lru_lock */
+static struct lock_class_key lru_lock_key;
+
 static struct container_subsys_state *
 mem_container_create(struct container_subsys *ss, struct container *cont)
 {
@@ -519,6 +522,7 @@
 	INIT_LIST_HEAD(&mem->active_list);
 	INIT_LIST_HEAD(&mem->inactive_list);
 	spin_lock_init(&mem->lru_lock);
+	lockdep_set_class(&mem->lru_lock, &lru_lock_key);
 	mem->control_type = MEM_CONTAINER_TYPE_ALL;
 	return &mem->css;
 }
-- 
regards,
Dhaval

I would like to change the world but they don't give me the source code!
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[-mm PATCH 0/9] Memory controller introduction (v4), Balbir Singh, (Fri Jul 27, 1:09 pm)
[-mm PATCH 2/9] Memory controller containers setup (v4), Balbir Singh, (Fri Jul 27, 1:09 pm)
[-mm PATCH 3/9] Memory controller accounting setup (v4), Balbir Singh, (Fri Jul 27, 1:10 pm)
[-mm PATCH 5/9] Memory controller task migration (v4), Balbir Singh, (Fri Jul 27, 1:10 pm)
[-mm PATCH 7/9] Memory controller OOM handling (v4), Balbir Singh, (Fri Jul 27, 1:10 pm)
Re: [-mm PATCH 6/9] Memory controller add per container LR ..., Dhaval Giani, (Mon Jul 30, 6:37 am)
Re: [-mm PATCH 4/9] Memory controller memory accounting (v4), YAMAMOTO Takashi, (Mon Jul 30, 8:38 pm)
Re: [-mm PATCH 6/9] Memory controller add per container LR ..., YAMAMOTO Takashi, (Mon Jul 30, 10:14 pm)
Re: [-mm PATCH 4/9] Memory controller memory accounting (v4), Vaidyanathan Srinivasan, (Tue Jul 31, 5:44 am)
Re: [-mm PATCH 6/9] Memory controller add per container LR ..., Vaidyanathan Srinivasan, (Tue Jul 31, 5:55 am)
Re: [-mm PATCH 6/9] Memory controller add per container LR ..., Vaidyanathan Srinivasan, (Tue Aug 7, 11:30 am)
Re: [-mm PATCH 0/9] Memory controller introduction (v4), KAMEZAWA Hiroyuki, (Tue Aug 7, 8:51 pm)
Re: [-mm PATCH 0/9] Memory controller introduction (v4), KAMEZAWA Hiroyuki, (Wed Aug 8, 12:51 am)
Re: [-mm PATCH 0/9] Memory controller introduction (v4), Vaidyanathan Srinivasan, (Thu Aug 9, 9:49 pm)
Re: [-mm PATCH 8/9] Memory controller add switch to contro ..., YAMAMOTO Takashi, (Sun Aug 12, 11:04 pm)
Re: [-mm PATCH 4/9] Memory controller memory accounting (v4), YAMAMOTO Takashi, (Wed Aug 15, 1:44 am)