Title: [8569] branches/2009R1/mm/page_alloc.c: Fix bug[#5968] Do drop_pagecache() after try_to_free_pages() for NOMMU.
Revision
8569
Author
sonicz
Date
2010-03-29 07:10:16 -0400 (Mon, 29 Mar 2010)

Log Message

Fix bug[#5968] Do drop_pagecache() after try_to_free_pages() for NOMMU.

Doing drop_pagecache earlier sometimes leads to try_to_free_pages()
retturn 0 endlessly with __GFP_FS not set in gfp_mask.

Modified Paths

Diff

Modified: branches/2009R1/mm/page_alloc.c (8568 => 8569)


--- branches/2009R1/mm/page_alloc.c	2010-03-29 11:09:38 UTC (rev 8568)
+++ branches/2009R1/mm/page_alloc.c	2010-03-29 11:10:16 UTC (rev 8569)
@@ -1543,10 +1543,6 @@
 	if (page)
 		goto got_pg;
 
-#ifndef CONFIG_MMU
-	drop_pagecache();
-#endif
-
 	/* This allocation should allow future memory freeing. */
 
 rebalance:
@@ -1585,6 +1581,10 @@
 
 	did_some_progress = try_to_free_pages(zonelist, order, gfp_mask);
 
+#ifndef CONFIG_MMU
+	drop_pagecache();
+#endif
+
 	p->reclaim_state = NULL;
 	p->flags &= ~PF_MEMALLOC;
 
@@ -1646,9 +1646,6 @@
 	pages_reclaimed += did_some_progress;
 	do_retry = 0;
 	if (!(gfp_mask & __GFP_NORETRY)) {
-#ifndef CONFIG_MMU
-		drop_pagecache();
-#endif
 		if (order <= PAGE_ALLOC_COSTLY_ORDER) {
 			do_retry = 1;
 		} else {
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to