patch-2.0.32 linux/mm/page_alloc.c
Next file: linux/mm/vmscan.c
Previous file: linux/mm/mmap.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Fri Nov 7 09:57:31 1997
- Orig file:
v2.0.31/linux/mm/page_alloc.c
- Orig date:
Sat Aug 23 10:54:08 1997
diff -u --recursive --new-file v2.0.31/linux/mm/page_alloc.c linux/mm/page_alloc.c
@@ -205,6 +205,8 @@
reserved_pages = 5;
if (priority != GFP_NFS)
reserved_pages = min_free_pages;
+ if ((priority == GFP_BUFFER || priority == GFP_IO) && reserved_pages >= 48)
+ reserved_pages -= (12 + (reserved_pages>>3));
save_flags(flags);
repeat:
cli();
@@ -214,7 +216,7 @@
return 0;
}
restore_flags(flags);
- if (try_to_free_page(priority, dma, 1))
+ if (priority != GFP_BUFFER && try_to_free_page(priority, dma, 1))
goto repeat;
return 0;
}
@@ -264,11 +266,13 @@
/*
* select nr of pages we try to keep free for important stuff
- * with a minimum of 24 pages. This is totally arbitrary
+ * with a minimum of 48 pages. This is totally arbitrary
*/
i = (end_mem - PAGE_OFFSET) >> (PAGE_SHIFT+7);
if (i < 24)
i = 24;
+ i += 24; /* The limit for buffer pages in __get_free_pages is
+ * decreased by 12+(i>>3) */
min_free_pages = i;
free_pages_low = i + (i>>1);
free_pages_high = i + i;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov