page allocator: inline buffered_rmqueue()
authorMel Gorman <[email protected]>
Tue, 16 Jun 2009 22:32:05 +0000 (15:32 -0700)
committerLinus Torvalds <[email protected]>
Wed, 17 Jun 2009 02:47:34 +0000 (19:47 -0700)
buffered_rmqueue() is in the fast path so inline it.  Because it only has
one call site, this function can then be inlined without causing text
bloat.  On an x86-based config, it made no difference as the savings were
padded out by NOP instructions.  Milage varies but text will either
decrease in size or remain static.

Signed-off-by: Mel Gorman <[email protected]>
Reviewed-by: KOSAKI Motohiro <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Lee Schermerhorn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/page_alloc.c

index 04713f649fd4a8aa865ae53bf4bb3fccfdf0001d..c101921e6a64bf0aca5707bee53a1265bf6efa0f 100644 (file)
@@ -1072,7 +1072,8 @@ void split_page(struct page *page, unsigned int order)
  * we cheat by calling it from here, in the order > 0 path.  Saves a branch
  * or two.
  */
-static struct page *buffered_rmqueue(struct zone *preferred_zone,
+static inline
+struct page *buffered_rmqueue(struct zone *preferred_zone,
                        struct zone *zone, int order, gfp_t gfp_flags,
                        int migratetype)
 {