All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Huang Shijie <shijie8@gmail.com>
Cc: akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com,
	linux-mm@kvack.org
Subject: Re: [PATCH 3/4] mm/page_alloc : modify the return type of __free_one_page
Date: Mon, 18 Jan 2010 11:25:54 +0000	[thread overview]
Message-ID: <20100118112554.GC7499@csn.ul.ie> (raw)
In-Reply-To: <1263184634-15447-3-git-send-email-shijie8@gmail.com>

On Mon, Jan 11, 2010 at 12:37:13PM +0800, Huang Shijie wrote:
>   Modify the return type for __free_one_page.
> It will return 1 on success, and return 0 when
> the check of the compound page is failed.
> 

Why?

I assume it's something to do with patch 4, but it's unclear at this
point why it's necessary. A brief explanation is needed in the
changelog.

> Signed-off-by: Huang Shijie <shijie8@gmail.com>
> ---
>  mm/page_alloc.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 00aa83a..290dfc3 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -445,17 +445,18 @@ static inline int page_is_buddy(struct page *page, struct page *buddy,
>   * triggers coalescing into a block of larger size.            
>   *
>   * -- wli
> + *
> + *  Returns 1 on success, else return 0;
>   */
>  
> -static inline void __free_one_page(struct page *page,
> -		struct zone *zone, unsigned int order,
> -		int migratetype)
> +static inline int __free_one_page(struct page *page, struct zone *zone,
> +		       unsigned int order, int migratetype)
>  {
>  	unsigned long page_idx;
>  
>  	if (unlikely(PageCompound(page)))
>  		if (unlikely(destroy_compound_page(page, order)))
> -			return;
> +			return 0;
>  
>  	VM_BUG_ON(migratetype == -1);
>  
> @@ -485,6 +486,7 @@ static inline void __free_one_page(struct page *page,
>  	list_add(&page->lru,
>  		&zone->free_area[order].free_list[migratetype]);
>  	zone->free_area[order].nr_free++;
> +	return 1;
>  }
>  
>  /*
> -- 
> 1.6.5.2
> 

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2010-01-18 11:26 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11  4:37 [PATCH 1/4] mm/page_alloc : rename rmqueue_bulk to rmqueue_single Huang Shijie
2010-01-11  4:37 ` [PATCH 2/4] mm/page_alloc : relieve the zone->lock's pressure for allocation Huang Shijie
2010-01-11  4:37   ` [PATCH 3/4] mm/page_alloc : modify the return type of __free_one_page Huang Shijie
2010-01-11  4:37     ` [PATCH 4/4] mm/page_alloc : relieve zone->lock's pressure for memory free Huang Shijie
2010-01-11  5:20       ` Minchan Kim
2010-01-11  6:01         ` Huang Shijie
2010-01-11  6:27       ` Huang Shijie
2010-01-11  6:38         ` Minchan Kim
2010-01-11  6:59           ` Huang Shijie
2010-01-12  0:47           ` KAMEZAWA Hiroyuki
2010-01-12  2:02             ` Huang Shijie
2010-01-12  2:07               ` KAMEZAWA Hiroyuki
2010-01-12  2:32                 ` Huang Shijie
2010-01-12  2:27             ` Wu Fengguang
2010-01-12  2:56               ` KOSAKI Motohiro
2010-01-12  3:02                 ` Huang Shijie
2010-01-12  4:05               ` Minchan Kim
2010-01-12  4:21                 ` Wu Fengguang
2010-01-12  4:32                   ` KAMEZAWA Hiroyuki
2010-01-12  4:59                     ` Wu Fengguang
2010-01-12  5:09                       ` Wu Fengguang
2010-01-12  5:10                     ` KOSAKI Motohiro
2010-01-12  7:36                       ` David Rientjes
2010-01-12  8:56                         ` KOSAKI Motohiro
2010-01-12 21:39                           ` David Rientjes
2010-01-13  0:01                             ` KOSAKI Motohiro
2010-01-12  4:48                   ` Minchan Kim
2010-01-12  2:51       ` Huang Shijie
2010-01-12  3:03         ` Wu Fengguang
2010-01-12  3:05         ` KOSAKI Motohiro
2010-01-11  5:04     ` [PATCH 3/4] mm/page_alloc : modify the return type of __free_one_page Minchan Kim
2010-01-12  2:56     ` KOSAKI Motohiro
2010-01-18 11:25     ` Mel Gorman [this message]
2010-01-19  1:49       ` Huang Shijie
2010-01-11  5:02   ` [PATCH 2/4] mm/page_alloc : relieve the zone->lock's pressure for allocation Minchan Kim
2010-01-11  5:13     ` Huang Shijie
2010-01-12  2:54   ` KOSAKI Motohiro
2010-01-18 11:24   ` Mel Gorman
2010-01-11  5:00 ` [PATCH 1/4] mm/page_alloc : rename rmqueue_bulk to rmqueue_single Minchan Kim
2010-01-12  2:52 ` KOSAKI Motohiro
2010-01-18 11:21 ` Mel Gorman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100118112554.GC7499@csn.ul.ie \
    --to=mel@csn.ul.ie \
    --cc=akpm@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=shijie8@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.