[PATCH] fix accounting of memory_pressure

From: Rik van Riel (riel@conectiva.com.br)
Date: Sun Jun 24 2001 - 17:11:44 EST


Hi,

the attached patch makes sure to only increase memory_pressure
in cases we actually found a page, this prevents the inactive
target from rising to infinite in case we don't have any
inactive_clean pages in the system...

(observed in testing)

regards,

Rik

--
Executive summary of a recent Microsoft press release:
   "we are concerned about the GNU General Public License (GPL)"

http://www.surriel.com/ http://www.conectiva.com/ http://distro.conectiva.com/

--- linux-2.4.5-ac17/mm/page_alloc.c.unlazy Sun Jun 24 19:03:03 2001 +++ linux-2.4.5-ac17/mm/page_alloc.c Sun Jun 24 19:05:22 2001 @@ -440,7 +440,6 @@ * the inactive clean list. (done by page_launder) */ if (gfp_mask & __GFP_WAIT) { - memory_pressure++; try_to_free_pages(gfp_mask); goto try_again; } --- linux-2.4.5-ac17/mm/vmscan.c.unlazy Sun Jun 24 19:03:03 2001 +++ linux-2.4.5-ac17/mm/vmscan.c Sun Jun 24 19:05:36 2001 @@ -397,6 +397,7 @@ goto out;

found_page: + memory_pressure++; del_page_from_inactive_clean_list(page); UnlockPage(page); page->age = PAGE_AGE_START; @@ -406,7 +407,6 @@ out: spin_unlock(&pagemap_lru_lock); spin_unlock(&pagecache_lock); - memory_pressure++; return page; }

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 30 2001 - 21:00:10 EST