[lc-checkins] CVS: linux/mm filemap.c,1.32,1.33 page_alloc.c,1.21,1.22 swap_state.c,1.35,1.36
Status: Beta
Brought to you by:
nitin_sf
From: Rodrigo S. de C. <rc...@us...> - 2002-07-15 20:52:26
|
Update of /cvsroot/linuxcompressed/linux/mm In directory usw-pr-cvs1:/tmp/cvs-serv1029/mm Modified Files: filemap.c page_alloc.c swap_state.c Log Message: Feature o Added feature to enable 8K pages (on i386). This option can only be selected if "Resize Compressed Cache On Demand" is enabled since it does not support pages with buffers. The motive to implement this idea is to make better use of the space reserved for compressed cache, since depending on the compression ratio, several fragments end up stored alone in a page. Index: filemap.c =================================================================== RCS file: /cvsroot/linuxcompressed/linux/mm/filemap.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** filemap.c 5 Jul 2002 15:21:49 -0000 1.32 --- filemap.c 15 Jul 2002 20:52:23 -0000 1.33 *************** *** 1099,1104 **** lru_cache_add(page); #ifdef CONFIG_COMP_PAGE_CACHE ! if (!read_comp_cache(mapping, index, page) && TryLockPage(page)) ! BUG(); #endif } --- 1099,1106 ---- lru_cache_add(page); #ifdef CONFIG_COMP_PAGE_CACHE ! if (!read_comp_cache(mapping, index, page) && TryLockPage(page)) { ! ClearPageUptodate(page); ! BUG(); ! } #endif } Index: page_alloc.c =================================================================== RCS file: /cvsroot/linuxcompressed/linux/mm/page_alloc.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** page_alloc.c 18 Jun 2002 18:04:31 -0000 1.21 --- page_alloc.c 15 Jul 2002 20:52:23 -0000 1.22 *************** *** 642,655 **** int j = ZONE_NORMAL; zone_t *zone = contig_page_data.node_zones + j; ! zone_num_comp_pages = num_comp_pages; ! 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]) --- 642,659 ---- int j = ZONE_NORMAL; zone_t *zone = contig_page_data.node_zones + j; + int real_num_comp_pages; ! /* the real number of memory pages used by compressed cache */ ! real_num_comp_pages = comp_page_to_page(num_comp_pages); ! ! zone_num_comp_pages = real_num_comp_pages; ! if (real_num_comp_pages > zone->size) ! real_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 - real_num_comp_pages)/zone_balance_ratio[j]); if (mask < zone_balance_min[j]) Index: swap_state.c =================================================================== RCS file: /cvsroot/linuxcompressed/linux/mm/swap_state.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -r1.35 -r1.36 *** swap_state.c 5 Jul 2002 15:21:50 -0000 1.35 --- swap_state.c 15 Jul 2002 20:52:23 -0000 1.36 *************** *** 216,219 **** --- 216,220 ---- set_vswap_allocating(entry); new_page = alloc_page(GFP_HIGHUSER); + clear_vswap_allocating(entry); if (!new_page) break; /* Out of memory */ *************** *** 252,256 **** if (new_page) page_cache_release(new_page); - clear_vswap_allocating(entry); return found_page; } --- 253,256 ---- |