All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	Pavel Emelyanov <xemul@openvz.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH rc5-mm1 3/3] do_try_to_free_pages gfp_mask redundant
Date: Wed, 12 Mar 2008 14:04:47 +0000	[thread overview]
Message-ID: <20080312140447.GC6072@csn.ul.ie> (raw)
In-Reply-To: <Pine.LNX.4.64.0803112114080.17067@blonde.site>

On (11/03/08 21:16), Hugh Dickins didst pronounce:
> do_try_to_free_pages is taking both a gfp_mask and an sc->gfp_mask,
> sometimes one used and sometimes the other; at present they're always
> identical, but such duplication begs for trouble: remove gfp_mask arg.
> 
> Signed-off-by: Hugh Dickins <hugh@veritas.com>

Acked-by: Mel Gorman <mel@csn.ul.ie>

> ---
> 
>  mm/vmscan.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> --- 2.6.25-rc5-mm1++/mm/vmscan.c	2008-03-11 20:15:47.000000000 +0000
> +++ linux/mm/vmscan.c	2008-03-11 20:21:14.000000000 +0000
> @@ -1324,7 +1324,7 @@ static unsigned long shrink_zones(int pr
>   * allocation attempt will fail.
>   */
>  static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
> -					gfp_t gfp_mask, struct scan_control *sc)
> +					struct scan_control *sc)
>  {
>  	int priority;
>  	int ret = 0;
> @@ -1334,7 +1334,7 @@ static unsigned long do_try_to_free_page
>  	unsigned long lru_pages = 0;
>  	struct zoneref *z;
>  	struct zone *zone;
> -	enum zone_type high_zoneidx = gfp_zone(gfp_mask);
> +	enum zone_type high_zoneidx = gfp_zone(sc->gfp_mask);
>  
>  	if (scan_global_lru(sc))
>  		count_vm_event(ALLOCSTALL);
> @@ -1363,7 +1363,7 @@ static unsigned long do_try_to_free_page
>  		 * over limit cgroups
>  		 */
>  		if (scan_global_lru(sc)) {
> -			shrink_slab(sc->nr_scanned, gfp_mask, lru_pages);
> +			shrink_slab(sc->nr_scanned, sc->gfp_mask, lru_pages);
>  			if (reclaim_state) {
>  				nr_reclaimed += reclaim_state->reclaimed_slab;
>  				reclaim_state->reclaimed_slab = 0;
> @@ -1435,7 +1435,7 @@ unsigned long try_to_free_pages(struct z
>  		.isolate_pages = isolate_pages_global,
>  	};
>  
> -	return do_try_to_free_pages(zonelist, gfp_mask, &sc);
> +	return do_try_to_free_pages(zonelist, &sc);
>  }
>  
>  #ifdef CONFIG_CGROUP_MEM_RES_CTLR
> @@ -1457,7 +1457,7 @@ unsigned long try_to_free_mem_cgroup_pag
>  	sc.gfp_mask = (gfp_mask & GFP_RECLAIM_MASK) |
>  			(GFP_HIGHUSER_MOVABLE & ~GFP_RECLAIM_MASK);
>  	zonelist = NODE_DATA(numa_node_id())->node_zonelists;
> -	return do_try_to_free_pages(zonelist, sc.gfp_mask, &sc);
> +	return do_try_to_free_pages(zonelist, &sc);
>  }
>  #endif
>  
> 

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

  reply	other threads:[~2008-03-12 14:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-11 21:12 [PATCH rc5-mm1 1/3] mm-have-zonelist: fix memcg ooms Hugh Dickins
2008-03-11 21:14 ` [PATCH rc5-mm1 2/3] just return do_try_to_free_pages Hugh Dickins
2008-03-12 13:58   ` Mel Gorman
2008-03-11 21:16 ` [PATCH rc5-mm1 3/3] do_try_to_free_pages gfp_mask redundant Hugh Dickins
2008-03-12 14:04   ` Mel Gorman [this message]
2008-03-12  7:38 ` [PATCH rc5-mm1 1/3] mm-have-zonelist: fix memcg ooms Balbir Singh
2008-03-12 12:29 ` Mel Gorman
2008-03-12 13:34   ` Hugh Dickins
2008-03-12 13:55     ` 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=20080312140447.GC6072@csn.ul.ie \
    --to=mel@csn.ul.ie \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=hugh@veritas.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xemul@openvz.org \
    /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.