Update of /cvsroot/linuxcompressed/linux/mm/comp_cache
In directory usw-pr-cvs1:/tmp/cvs-serv18087/mm/comp_cache
Modified Files:
aux.c main.c swapout.c
Log Message:
Features
o Added boot info for the max size of comp cache
Bug fixes
o Fixed bug introduced in lru queue handling functions cleanup. Only vswap
addresses were affected.
o Fixed another bug introduced in a cleanup. Again, only vswap addresses
could hit this bug.
Cleanups
o Now we access Freed bit. This kind of fragment (Freed fragments) were
referenced by !fragment->mapping.
Index: aux.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/comp_cache/aux.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** aux.c 1 Jul 2002 18:16:59 -0000 1.34
--- aux.c 1 Jul 2002 21:36:50 -0000 1.35
***************
*** 2,6 ****
* linux/mm/comp_cache/aux.c
*
! * Time-stamp: <2002-07-01 15:14:12 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* linux/mm/comp_cache/aux.c
*
! * Time-stamp: <2002-07-01 18:04:55 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 336,340 ****
#ifdef CONFIG_COMP_PAGE_CACHE
! if (PageSwapCache(fragment)) {
list_add(&(fragment->lru_queue), &lru_queue);
return;
--- 336,340 ----
#ifdef CONFIG_COMP_PAGE_CACHE
! if (!PageSwapCache(fragment)) {
list_add(&(fragment->lru_queue), &lru_queue);
return;
***************
*** 356,360 ****
#ifdef CONFIG_COMP_PAGE_CACHE
! if (PageSwapCache(fragment)) {
list_del_init(&(fragment->lru_queue));
return;
--- 356,360 ----
#ifdef CONFIG_COMP_PAGE_CACHE
! if (!PageSwapCache(fragment)) {
list_del_init(&(fragment->lru_queue));
return;
Index: main.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/comp_cache/main.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -r1.50 -r1.51
*** main.c 1 Jul 2002 17:37:29 -0000 1.50
--- main.c 1 Jul 2002 21:36:50 -0000 1.51
***************
*** 2,6 ****
* linux/mm/comp_cache/main.c
*
! * Time-stamp: <2002-07-01 13:12:44 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* linux/mm/comp_cache/main.c
*
! * Time-stamp: <2002-07-01 15:45:58 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 306,310 ****
printk("Compressed Cache: %s\n", COMP_CACHE_VERSION);
printk("Compressed Cache: initial size\n"
! "Compressed Cache: %lu pages = %luKiB\n", init_num_comp_pages, (init_num_comp_pages * PAGE_SIZE)/1024);
/* fiz zone watermarks */
--- 306,314 ----
printk("Compressed Cache: %s\n", COMP_CACHE_VERSION);
printk("Compressed Cache: initial size\n"
! "Compressed Cache: %lu pages = %luKiB\n"
! "Compressed Cache: maximum size\n"
! "Compressed Cache: %lu pages = %luKiB\n",
! init_num_comp_pages, (init_num_comp_pages * PAGE_SIZE)/1024,
! max_num_comp_pages, (max_num_comp_pages * PAGE_SIZE)/1024);
/* fiz zone watermarks */
Index: swapout.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/comp_cache/swapout.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -r1.55 -r1.56
*** swapout.c 1 Jul 2002 18:16:59 -0000 1.55
--- swapout.c 1 Jul 2002 21:36:50 -0000 1.56
***************
*** 2,6 ****
* /mm/comp_cache/swapout.c
*
! * Time-stamp: <2002-07-01 15:14:39 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* /mm/comp_cache/swapout.c
*
! * Time-stamp: <2002-07-01 18:13:35 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 69,76 ****
}
! /* has the fragment we are swapping out been already
* freed? Given that we were on IO process,
* comp_cache_free() didn't free the fragment struct,
! * so let's do it now */
if (!CompFragmentTestandClearIO(fragment)) {
kmem_cache_free(fragment_cachep, (fragment));
--- 69,78 ----
}
! /***
! * Has the fragment we are swapping out been already
* freed? Given that we were on IO process,
* comp_cache_free() didn't free the fragment struct,
! * so let's do it now.
! */
if (!CompFragmentTestandClearIO(fragment)) {
kmem_cache_free(fragment_cachep, (fragment));
***************
*** 85,89 ****
* comp_cache_free()
*/
! if (!fragment->mapping) //!CompFragmentFreed(fragment))
goto out;
--- 87,91 ----
* comp_cache_free()
*/
! if (CompFragmentFreed(fragment))
goto out;
|