page allocator: break up the allocator entry point into fast and slow paths
authorMel Gorman <[email protected]>
Tue, 16 Jun 2009 22:31:57 +0000 (15:31 -0700)
committerLinus Torvalds <[email protected]>
Wed, 17 Jun 2009 02:47:32 +0000 (19:47 -0700)
commit11e33f6a55ed7847d9c8ffe185ef87faf7806abe
treeca70fe29e836c508cc279c619f7b856380a6f10f
parent7f82af9742a9346794ecc1515139daed480e7025
page allocator: break up the allocator entry point into fast and slow paths

The core of the page allocator is one giant function which allocates
memory on the stack and makes calculations that may not be needed for
every allocation.  This patch breaks up the allocator path into fast and
slow paths for clarity.  Note the slow paths are still inlined but the
entry is marked unlikely.  If they were not inlined, it actally increases
text size to generate the as there is only one call site.

Signed-off-by: Mel Gorman <[email protected]>
Reviewed-by: Christoph Lameter <[email protected]>
Cc: KOSAKI Motohiro <[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