lkml.org 
[lkml]   [2001]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectUpd: [PATCH NG] alloc_pages_limit & pages_min
Date
Riel convinced be to back off a part of the patch.
Here comes an updated one.

--
Roger Larsson
Skellefteå
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 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/
\
 
 \ /
  Last update: 2005-03-22 12:58    [from the cache]
©2003-2011 Jasper Spaans