[lc-checkins] CVS: linux/mm page_alloc.c,1.13,1.14 vmscan.c,1.23,1.24
Status: Beta
Brought to you by:
nitin_sf
From: Rodrigo S. de C. <rc...@us...> - 2002-01-02 16:59:10
|
Update of /cvsroot/linuxcompressed/linux/mm In directory usw-pr-cvs1:/tmp/cvs-serv21198/mm Modified Files: page_alloc.c vmscan.c Log Message: - shrink_comp_cache() now checks empty comp cache entries and frees them if the comp cache needs to be shrunk. This check occurs even if the comp page we pass as parameter is not freeable for the cache shrink. - grow_comp_cache() now grows the comp cache many pages at once. It will grow half the pages freed in try_to_free_pages() if we need to grow the cache. Only pages from normal zone are taken into account since those are the kind of pages we allocate. - added myself to MAINTAINERS file and also wrote help text to compressed cache config option in Documentation/Configure.help Index: page_alloc.c =================================================================== RCS file: /cvsroot/linuxcompressed/linux/mm/page_alloc.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** page_alloc.c 2001/12/14 15:27:01 1.13 --- page_alloc.c 2002/01/02 16:59:05 1.14 *************** *** 88,92 **** BUG(); page->flags &= ~((1<<PG_referenced) | (1<<PG_dirty) | (1<<PG_comp_swap_cache)); ! if (current->flags & PF_FREE_PAGES) goto local_freelist; --- 88,92 ---- BUG(); page->flags &= ~((1<<PG_referenced) | (1<<PG_dirty) | (1<<PG_comp_swap_cache)); ! if (current->flags & PF_FREE_PAGES) goto local_freelist; Index: vmscan.c =================================================================== RCS file: /cvsroot/linuxcompressed/linux/mm/vmscan.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** vmscan.c 2001/12/28 21:45:24 1.23 --- vmscan.c 2002/01/02 16:59:05 1.24 *************** *** 519,528 **** UnlockPage(page); - /* steal the page if we need to grow the comp cache */ - if (grow_comp_cache(page)) { - max_scan++; - continue; - } - /* effectively free the page here */ page_cache_release(page); --- 519,522 ---- *************** *** 604,609 **** do { nr_pages = shrink_caches(classzone, priority, gfp_mask, nr_pages); ! if (nr_pages <= 0) return 1; } while (--priority); --- 598,608 ---- do { nr_pages = shrink_caches(classzone, priority, gfp_mask, nr_pages); ! if (nr_pages <= 0) { ! /* let's steal at most half the pages that has ! * been freed by shrink_caches to grow ! * compressed cache (only for normal zone) */ ! grow_comp_cache(classzone, SWAP_CLUSTER_MAX/2); return 1; + } } while (--priority); |