Update of /cvsroot/linuxcompressed/linux/mm/comp_cache
In directory usw-pr-cvs1:/tmp/cvs-serv27959/mm/comp_cache
Modified Files:
adaptivity.c proc.c
Log Message:
Bug fixes
o Fixed potential oops in __read_cache_page() due to a misplaced
steal_page_from_comp_cache() call.
o Fixed bug in __read_swap_cache_async() which would end up getting an
extra reference on a swap cache page and would also erroneously stop a
swapin readahead.
o Fixed major bug in shrink_cache() that could hang the machine. We
could write a page in compress_dirty_page() even if the GFP mask does
not allow!
Cleanups
o Added #ifdefs to some flush_comp_cache() calls.
o Replaced find_comp_page() in do_swap_page() by a in_comp_cache()
call.
Other
o Added page count check to shrink_comp_cache(). Only to make sure the
page is going to be actually freed.
o Removed write permission from /proc/sys/vm/comp_cache/size when
resize on demand option is enabled.
Index: adaptivity.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/comp_cache/adaptivity.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** adaptivity.c 1 Jul 2002 18:44:40 -0000 1.32
--- adaptivity.c 5 Jul 2002 15:21:54 -0000 1.33
***************
*** 2,6 ****
* linux/mm/comp_cache/adaptivity.c
*
! * Time-stamp: <2002-07-01 15:19:18 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* linux/mm/comp_cache/adaptivity.c
*
! * Time-stamp: <2002-07-04 13:59:28 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 525,528 ****
--- 525,530 ----
shrink:
remove_comp_page_from_hash_table(empty_comp_page);
+ if (page_count(empty_comp_page->page) != 1)
+ BUG();
UnlockPage(empty_comp_page->page);
page_cache_release(empty_comp_page->page);
Index: proc.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/comp_cache/proc.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** proc.c 19 Jun 2002 12:18:44 -0000 1.16
--- proc.c 5 Jul 2002 15:21:55 -0000 1.17
***************
*** 2,6 ****
* linux/mm/comp_cache/proc.c
*
! * Time-stamp: <2002-06-19 08:59:17 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* linux/mm/comp_cache/proc.c
*
! * Time-stamp: <2002-07-05 10:01:47 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 55,59 ****
ctl_table comp_cache_table[] = {
! {CC_SIZE, "size", &new_num_comp_pages, sizeof(int), 0644, NULL,
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_num_comp_pages,
&max_num_comp_pages},
--- 55,65 ----
ctl_table comp_cache_table[] = {
! {CC_SIZE, "size", &new_num_comp_pages, sizeof(int),
! #ifdef CONFIG_COMP_DEMAND_RESIZE
! 0444,
! #else
! 0644,
! #endif
! NULL,
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_num_comp_pages,
&max_num_comp_pages},
|