linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>,
	Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Minchan Kim <minchan.kim@gmail.com>,
	Wu Fengguang <fengguang.wu@intel.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>, Jens Axboe <axboe@kernel.dk>,
	linux-mm@kvack.org
Subject: Re: [patch] mm: fix deferred congestion timeout if preferred zone is not allowed
Date: Wed, 19 Jan 2011 10:37:51 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.00.1101191034060.16126@chino.kir.corp.google.com> (raw)
In-Reply-To: <20110119215500.2833.A69D9226@jp.fujitsu.com>

On Wed, 19 Jan 2011, KOSAKI Motohiro wrote:

> I'm glad to you are keeping fastpath concern. However you don't need
> nodemask-and in this case. Because zonelist->zref[0] is always in nodemask.
> Please see policy_zonelist(). So, you can just replace nodemask with cpuset_mems_allowed.
> 
> This is not only simple, but also improve a consisteny of mempolicy.
> 

mempolicies have nothing to do with this, they pass their nodemask into 
the page allocator so the preferred_zone is already allowed; setting a 
mempolicy with a nodemask that is disallowed by the cpuset is an invalid 
configuration.

> ---
>  mm/page_alloc.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 07a6544..876de04 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2146,7 +2146,8 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
>  
>  	get_mems_allowed();
>  	/* The preferred zone is used for statistics later */
> -	first_zones_zonelist(zonelist, high_zoneidx, nodemask, &preferred_zone);
> +	first_zones_zonelist(zonelist, high_zoneidx,
> +			     &cpuset_current_mems_allowed, &preferred_zone);
>  	if (!preferred_zone) {
>  		put_mems_allowed();
>  		return NULL;

As previously mentioned, I didn't want to affect the current behavior of 
mempolicies when they pass their own nodemask into the page allocator that 
may be a subset of the set of allowed nodes; in that case, the statistics 
are probably actually important and we can defer resetting preferred_zone 
to the slowpath where we know its a __GFP_WAIT allocation instead of the 
first try in the fastpath.

--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-01-19 18:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18  5:09 David Rientjes
2011-01-18  6:04 ` KOSAKI Motohiro
2011-01-18 10:29   ` Mel Gorman
2011-01-19 12:48     ` KOSAKI Motohiro
2011-01-18 10:15 ` Mel Gorman
2011-01-18 20:24   ` David Rientjes
2011-01-18 20:42     ` Mel Gorman
2011-01-19  1:51       ` David Rientjes
2011-01-19 13:01     ` KOSAKI Motohiro
2011-01-19 18:37       ` David Rientjes [this message]
2011-01-19 12:52   ` KOSAKI Motohiro
2011-01-19  0:43 ` Minchan Kim
2011-01-19  1:53   ` David Rientjes
2011-01-19  4:10     ` Minchan Kim
2011-01-19 19:59     ` Christoph Lameter
2011-01-19 20:06       ` Andi Kleen
2011-01-19 20:18         ` David Rientjes
2011-01-19 23:07           ` Christoph Lameter
2011-01-20  0:59           ` Minchan Kim
2011-01-23 22:30 ` [patch v2] " David Rientjes
2011-01-24 17:16   ` Rik van Riel

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=alpine.DEB.2.00.1101191034060.16126@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=fengguang.wu@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.com \
    --cc=riel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox