Re: [PATCH 13/25] Inline __rmqueue_smallest()

KOSAKI Motohiro
2009-04-21T09:51:46Z

> Inline __rmqueue_smallest by altering flow very slightly so that there
> is only one call site. This allows the function to be inlined without
> additional text bloat.
>
> Signed-off-by: Mel Gorman <mel@csn.ul.ie>
> Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
> ---
> mm/page_alloc.c | 23 ++++++++++++++++++-----
> 1 files changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index b13fc29..91a2cdb 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -665,7 +665,8 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
> * Go through the free lists for the given migratetype and remove
> * the smallest available page from the freelists
> */
> -static struct page *__rmqueue_smallest(struct zone *zone, unsigned int order,
> +static inline
> +struct page *__rmqueue_smallest(struct zone *zone, unsigned int order,
> int migratetype)

"only one caller" is one of keypoint of this patch, I think.
so, commenting is better? but it isn't blocking reason at all.

Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>