[lc-checkins] CVS: linux/mm filemap.c,1.41,1.42 page_alloc.c,1.25,1.26 swap_state.c,1.40,1.41 swapfi
Status: Beta
Brought to you by:
nitin_sf
From: Rodrigo S. de C. <rc...@us...> - 2002-11-29 21:23:05
|
Update of /cvsroot/linuxcompressed/linux/mm In directory sc8-pr-cvs1:/tmp/cvs-serv31487/mm Modified Files: filemap.c page_alloc.c swap_state.c swapfile.c Log Message: Cleanups o New ifdefs to avoid compiling code for clean page adaptability when it is disabled. o Some whitespace changes to make the patch a little shorter. o Removed variable not used in swapout.c Bug fixes o Fixed a bug in comp_cache_fix_watermarks() introduce lately. This bug would set the watermark to a huge number (due to negative values), what would end up in a huge increase in the memory pressure. Fortunately, that is only noticeable when the system has a low amount of memory. o vswap_num_reserved_entries variable was used without being initialized. Depending on the scenario, it could have bogus value which would screw up compressed cache behaviour. o The total free space hash was set in function of the free_space_interval. A potential bug if the total_free_space_interval is set to a value different from the one in free_space_interval. o If the compressed cache cannot allocate the minimum number of pages in the boot process, the shrinkage code could end up annihilate compressed cache because it assumes the compressed cache will always have the number of pages equal or greater than the minimum size. Index: filemap.c =================================================================== RCS file: /cvsroot/linuxcompressed/linux/mm/filemap.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** filemap.c 22 Nov 2002 16:01:34 -0000 1.41 --- filemap.c 29 Nov 2002 21:23:02 -0000 1.42 *************** *** 777,783 **** --- 777,785 ---- } } + #ifndef CONFIG_COMP_DIS_CLEAN if (clean_page_compress_lock) hit_clean_page(page); #endif + #endif error = mapping->a_ops->readpage(file, page); page_cache_release(page); *************** *** 1551,1555 **** readpage: ! #ifdef CONFIG_COMP_PAGE_CACHE if (clean_page_compress_lock) hit_clean_page(page); --- 1553,1557 ---- readpage: ! #if defined(CONFIG_COMP_PAGE_CACHE) && !defined(CONFIG_COMP_DIS_CLEAN) if (clean_page_compress_lock) hit_clean_page(page); *************** *** 2109,2113 **** } ! #ifdef CONFIG_COMP_PAGE_CACHE if (clean_page_compress_lock) hit_clean_page(page); --- 2111,2115 ---- } ! #if defined(CONFIG_COMP_PAGE_CACHE) && !defined(CONFIG_COMP_DIS_CLEAN) if (clean_page_compress_lock) hit_clean_page(page); *************** *** 2140,2144 **** } ClearPageError(page); ! #ifdef CONFIG_COMP_PAGE_CACHE if (clean_page_compress_lock) hit_clean_page(page); --- 2142,2146 ---- } ClearPageError(page); ! #if defined(CONFIG_COMP_PAGE_CACHE) && !defined(CONFIG_COMP_DIS_CLEAN) if (clean_page_compress_lock) hit_clean_page(page); Index: page_alloc.c =================================================================== RCS file: /cvsroot/linuxcompressed/linux/mm/page_alloc.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** page_alloc.c 22 Nov 2002 16:01:34 -0000 1.25 --- page_alloc.c 29 Nov 2002 21:23:02 -0000 1.26 *************** *** 653,656 **** --- 653,659 ---- zone = contig_page_data.node_zones + ZONE_NORMAL; + if (num_memory_pages > zone->size) + num_memory_pages = zone->size; + /* whoops: that should be zone->size minus zholes. Since * zholes is always 0 when calling free_area_init_core(), I Index: swap_state.c =================================================================== RCS file: /cvsroot/linuxcompressed/linux/mm/swap_state.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** swap_state.c 22 Nov 2002 16:01:35 -0000 1.40 --- swap_state.c 29 Nov 2002 21:23:02 -0000 1.41 *************** *** 244,248 **** if (get_swap_compressed(entry)) PageSetCompressed(new_page); ! #ifdef CONFIG_COMP_PAGE_CACHE if (clean_page_compress_lock) hit_clean_page(new_page); --- 244,248 ---- if (get_swap_compressed(entry)) PageSetCompressed(new_page); ! #if defined(CONFIG_COMP_CACHE) && !defined(CONFIG_COMP_DIS_CLEAN) if (clean_page_compress_lock) hit_clean_page(new_page); Index: swapfile.c =================================================================== RCS file: /cvsroot/linuxcompressed/linux/mm/swapfile.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** swapfile.c 22 Nov 2002 16:01:35 -0000 1.36 --- swapfile.c 29 Nov 2002 21:23:02 -0000 1.37 *************** *** 24,30 **** int total_swap_pages; static int swap_overflow; - #ifdef CONFIG_COMP_SWAP - unsigned long max_comp_swap_pages = 0; - #endif static const char Bad_file[] = "Bad swap file entry "; --- 24,27 ---- *************** *** 1350,1353 **** --- 1347,1351 ---- goto bad_swap; } + error = 0; memset(p->swap_map, 0, maxpages * sizeof(short)); *************** *** 1657,1658 **** --- 1655,1658 ---- return ret; } + + |