[lc-checkins] CVS: linux/include/linux comp_cache.h,1.65,1.66
Status: Beta
Brought to you by:
nitin_sf
|
From: Rodrigo S. de C. <rc...@us...> - 2002-05-15 18:05:38
|
Update of /cvsroot/linuxcompressed/linux/include/linux
In directory usw-pr-cvs1:/tmp/cvs-serv11239/include/linux
Modified Files:
comp_cache.h
Log Message:
- Fix meminfo output when compressed cache is enabled. Thus, cached memory
and swap cached memory actually corresponds to the cache and swap cached
memory in non-compressed cache. Besides, adds two lines to its output with
information about compressed cache memory consumption like how much memory
was reserved and how much is being used at that moment.
Index: comp_cache.h
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/include/linux/comp_cache.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -r1.65 -r1.66
*** comp_cache.h 2 May 2002 16:31:37 -0000 1.65
--- comp_cache.h 15 May 2002 18:05:35 -0000 1.66
***************
*** 2,6 ****
* linux/mm/comp_cache.h
*
! * Time-stamp: <2002-04-30 10:47:23 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* linux/mm/comp_cache.h
*
! * Time-stamp: <2002-05-15 10:32:02 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 34,40 ****
#define MAX_COMPRESSED_SIZE 4500
! #define NUM_VSWAP_ENTRIES (3 * real_num_comp_pages)
! extern unsigned long real_num_comp_pages, new_num_comp_pages, max_num_comp_pages;
struct pte_list {
--- 34,40 ----
#define MAX_COMPRESSED_SIZE 4500
! #define NUM_VSWAP_ENTRIES (3 * num_comp_pages)
! extern unsigned long num_comp_pages, num_swapper_fragments, new_num_comp_pages, max_num_comp_pages;
struct pte_list {
***************
*** 344,347 ****
--- 344,349 ----
extern unsigned long comp_cache_free_space;
+ #define comp_cache_used_space ((num_comp_pages * PAGE_SIZE) - comp_cache_free_space)
+
#define add_swap_miss() (nr_swap_misses++)
#define add_compressed_cache_miss() (nr_compressed_cache_misses++)
***************
*** 384,387 ****
--- 386,390 ----
extern unsigned long vswap_current_num_entries;
extern unsigned long vswap_num_used_entries;
+ extern unsigned long vswap_num_swap_cache;
extern unsigned int vswap_last_used;
|