Hi Maeda,

Thanks for your work. I will include your patch in the next release of the 
mem RC.
 
  Valérie



Hi Vale'rie,

I found a nasty bug in memrc-f0.4-2615-v2. Since the LSB of
page->mapping is used for a flag that shows whether it points
to anon_vma or address_space, its LSB must be off before using it
as the pointer to the anon_vma.

The problem is always reproducible on removing a class on which
kenbench is running.

The following patch is a sample fix.

Thanks,
MAEDA Naoaki


Index: linux-2.6.15-f0.4-cpurc-v0.3-mem/kernel/ckrm/ckrm_memctlr.c
===================================================================
--- linux-2.6.15-f0.4-cpurc-v0.3-mem.orig/kernel/ckrm/ckrm_memctlr.c
+++ linux-2.6.15-f0.4-cpurc-v0.3-mem/kernel/ckrm/ckrm_memctlr.c
@@ -149,7 +149,9 @@ ckrm_mem_evaluate_page_anon(struct page*
 {
                 struct ckrm_mem_res* pgcls = page_ckrmzone(page)->memcls;
                 struct ckrm_mem_res* maxshareclass = NULL;
-                struct anon_vma *anon_vma = (struct anon_vma *) 
page->mapping;
+                struct anon_vma *anon_vma =
+                                (struct anon_vma *) ((unsigned long) 
page->mapping
+                - PAGE_MAPPING_ANON);
                 struct vm_area_struct *vma;
                 struct mm_struct* mm;
                 int ret = 0;






-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech

Reply via email to