[lc-checkins] CVS: linux/mm memory.c,1.28,1.29 page_alloc.c,1.16,1.17
Status: Beta
Brought to you by:
nitin_sf
|
From: Rodrigo S. de C. <rc...@us...> - 2002-05-21 18:49:10
|
Update of /cvsroot/linuxcompressed/linux/mm
In directory usw-pr-cvs1:/tmp/cvs-serv1879/mm
Modified Files:
memory.c page_alloc.c
Log Message:
- New statistics for compressed dirty and clean pages
- Cleanups regarding comp_cache_skip_* prototypes. These functions will no
longer be used in compressed cache since they impose fundamental changes
upon the VM that aren't worth it and would require long time researching and
testing.
- Some comestic changes regarding the information printed on boot process.
- Now we fix the normal zone watermarks when compressed cache is initialized
to make sure we don't put too much (and unneeded) pressure on the
uncompressed cache. For example, on a system with 48M RAM and 24M compressed
cache, the watermarks on the remaining 24M uncompressed cache will have been
wrongly computed on the 48M total memory. Now we make sure that the
watermarks are computed on the correct amount of uncompressed cache
available memory. This information (old and new watermarks) is printed along
with the initial compressed cache boot messages.
- Clean CompCache bit for freed pages in lookup_all_comp_pages().
- Make sure we first try to get a swap buffer without syncing its buffers to
disk. Earlier, we were syncing any dirty buffer as soon as we could lock a
page. Now that's done only in case we couldn't get any page without syncing
its buffer in order to free them. That's done cleaning up the __GFP_IO flag
if we are in the "don't sync" (= !wait) stage.
Index: memory.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/memory.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** memory.c 2 May 2002 16:31:37 -0000 1.28
--- memory.c 21 May 2002 18:49:06 -0000 1.29
***************
*** 1141,1145 ****
/* major fault */
ret = 2;
! }
page = read_swap_cache_async(entry);
if (!page) {
--- 1141,1145 ----
/* major fault */
ret = 2;
! }
page = read_swap_cache_async(entry);
if (!page) {
Index: page_alloc.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/page_alloc.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** page_alloc.c 26 Feb 2002 20:59:01 -0000 1.16
--- page_alloc.c 21 May 2002 18:49:06 -0000 1.17
***************
*** 626,629 ****
--- 626,659 ----
#define LONG_ALIGN(x) (((x)+(sizeof(long))-1)&~((sizeof(long))-1))
+ #ifdef CONFIG_COMP_CACHE
+ void comp_cache_fix_watermarks(int num_comp_pages)
+ {
+ unsigned long mask;
+ int j = ZONE_NORMAL;
+ zone_t *zone = contig_page_data.node_zones + j;
+
+ if (num_comp_pages > zone->size)
+ num_comp_pages = zone->size;
+
+ /* whoops: that should be zone->size minus zholes. Since
+ * zholes is always 0 when calling free_area_init_core(), I
+ * guess we don't have to worry about that now */
+ mask = ((zone->size - num_comp_pages)/zone_balance_ratio[j]);
+
+ if (mask < zone_balance_min[j])
+ mask = zone_balance_min[j];
+ else if (mask > zone_balance_max[j])
+ mask = zone_balance_max[j];
+
+ printk("Compressed Cache: page watermarks (normal zone)\n"
+ "Compressed Cache: (%lu, %lu, %lu) -> ",
+ zone->pages_min, zone->pages_low, zone->pages_high);
+ zone->pages_min = mask;
+ zone->pages_low = mask*2;
+ zone->pages_high = mask*3;
+ printk("(%lu, %lu, %lu)\n", zone->pages_min, zone->pages_low, zone->pages_high);
+ }
+ #endif
+
/*
* Set up the zone data structures:
|