[PATCH] vmscan: remove painful micro optimization

From: KOSAKI Motohiro
Date: Tue May 24 2011 - 00:41:57 EST


Currently, __alloc_pages_direct_reclaim() call get_page_from_freelist()
only if try_to_free_pages() return !0.

It's no necessary micro optimization becauase "return 0" mean vmscan reached
priority 0 and didn't get any pages, iow, it's really slow path. But also it
has bad side effect. If we don't call drain_all_pages(), we have a chance to
get infinite loop.

This patch remove its bad and meaningless micro optimization.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
---
mm/page_alloc.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1572079..c41d488 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1950,9 +1950,6 @@ __alloc_pages_direct_reclaim(gfp_t gfp_mask, unsigned int order,

cond_resched();

- if (unlikely(!(*did_some_progress)))
- return NULL;
-
retry:
page = get_page_from_freelist(gfp_mask, nodemask, order,
zonelist, high_zoneidx,
--
1.7.3.1




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