Upd: [PATCH NG] alloc_pages_limit & pages_min
From: Roger Larsson <hidden>
Date: 2001-08-23 19:33:27
Also in:
lkml
Riel convinced be to back off a part of the patch. Here comes an updated one. -- Roger Larsson Skelleftea Sweden ******************************************* Patch prepared by: roger.larsson@norran.net Name of file: linux-2.4.8-pre3-pages_min-R3
--- linux/mm/page_alloc.c.orig Thu Aug 23 19:58:55 2001
+++ linux/mm/page_alloc.c Thu Aug 23 21:19:20 2001@@ -253,11 +253,26 @@ if (z->free_pages + z->inactive_clean_pages >= water_mark) { struct page *page = NULL; - /* If possible, reclaim a page directly. */ - if (direct_reclaim) + + /* + * Reclaim a page from the inactive_clean list. + * If needed, refill the free list up to the + * low water mark. + */ + if (direct_reclaim) { page = reclaim_page(z); - /* If that fails, fall back to rmqueue. */ - if (!page) + + while (page && z->free_pages < z->pages_min) { + __free_page(page); + page = reclaim_page(z); + } + + /* let kreclaimd handle up to pages_high */ + } + /* If that fails, fall back to rmqueue, but never let + * free_pages go below pages_min... + */ + if (!page && z->free_pages >= z->pages_min) page = rmqueue(z, order); if (page) return page; --
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/