lkml.org 
[lkml]   [2012]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] mm: don't invoke __alloc_pages_direct_compact when order 0
On Mon, 9 Jul 2012, JoonSoo Kim wrote:

> I think __alloc_pages_direct_compact() can't be inlined by gcc,
> because it is so big and is invoked two times in __alloc_pages_nodemask().
>

We could fix that by doing

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2057,7 +2057,7 @@ out:

#ifdef CONFIG_COMPACTION
/* Try memory compaction for high-order allocations before reclaim */
-static struct page *
+static __always_inline struct page *
__alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
struct zonelist *zonelist, enum zone_type high_zoneidx,
nodemask_t *nodemask, int alloc_flags, struct zone *preferred_zone,
but I'm not convinced that it's helpful for performance in the slowpath
and there's no guarantee that it's called more often for order-0
allocations since it is called as a fallback when should_alloc_retry()
fails.


\
 
 \ /
  Last update: 2012-07-09 23:41    [W:0.045 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site