[lc-checkins] CVS: linux/mm/comp_cache main.c,1.38,1.39 proc.c,1.9,1.10
Status: Beta
Brought to you by:
nitin_sf
|
From: Rodrigo S. de C. <rc...@us...> - 2002-05-23 21:25:36
|
Update of /cvsroot/linuxcompressed/linux/mm/comp_cache
In directory usw-pr-cvs1:/tmp/cvs-serv6532/mm/comp_cache
Modified Files:
main.c proc.c
Log Message:
- Fixed a buglet that wouldn't let the user to resize the compressed cache
size to a value smaller than the initial number of compressed pages.
- Added a file "actual_size" to /proc/sys/vm/comp_cache directory. This file
displays the actual size of compressed cache. The current "size" file shows
the new size (the size we are trying to resize to), not its current size.
Index: main.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/comp_cache/main.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** main.c 23 May 2002 13:52:44 -0000 1.38
--- main.c 23 May 2002 21:25:33 -0000 1.39
***************
*** 2,6 ****
* linux/mm/comp_cache/main.c
*
! * Time-stamp: <2002-05-23 10:38:17 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* linux/mm/comp_cache/main.c
*
! * Time-stamp: <2002-05-23 17:49:09 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 161,170 ****
max_num_comp_pages = num_physpages * 0.5;
#ifndef CONFIG_COMP_ADAPTIVITY
if (!init_num_comp_pages || init_num_comp_pages > max_num_comp_pages)
#endif
! init_num_comp_pages = num_physpages * 0.10;
! new_num_comp_pages = min_num_comp_pages = num_comp_pages = init_num_comp_pages;
printk("Compressed Cache: %s\n", COMP_CACHE_VERSION);
--- 161,171 ----
max_num_comp_pages = num_physpages * 0.5;
+ min_num_comp_pages = num_physpages * 0.1;
#ifndef CONFIG_COMP_ADAPTIVITY
if (!init_num_comp_pages || init_num_comp_pages > max_num_comp_pages)
#endif
! init_num_comp_pages = min_num_comp_pages;
! new_num_comp_pages = num_comp_pages = init_num_comp_pages;
printk("Compressed Cache: %s\n", COMP_CACHE_VERSION);
Index: proc.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/comp_cache/proc.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** proc.c 21 May 2002 18:49:06 -0000 1.9
--- proc.c 23 May 2002 21:25:33 -0000 1.10
***************
*** 2,6 ****
* linux/mm/comp_cache/proc.c
*
! * Time-stamp: <2002-05-16 14:11:49 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* linux/mm/comp_cache/proc.c
*
! * Time-stamp: <2002-05-23 18:00:34 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 44,48 ****
{
CC_SIZE=1,
! CC_ALGORITHM=2
};
--- 44,49 ----
{
CC_SIZE=1,
! CC_ACTUAL_SIZE=2,
! CC_ALGORITHM=3
};
***************
*** 51,54 ****
--- 52,56 ----
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_num_comp_pages,
&max_num_comp_pages},
+ {CC_ACTUAL_SIZE, "actual_size", &num_comp_pages, sizeof(int), 0444, NULL, &proc_dointvec},
{CC_ALGORITHM, "algorithm", ¤t_algorithm, sizeof(int), 0644, NULL,
&proc_dointvec_minmax, &sysctl_intvec, NULL, &algorithm_min,
|