linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Lee.Schermerhorn@hp.com, pj@sgi.com, ak@suse.de,
	kamezawa.hiroyu@jp.fujitsu.com, clameter@sgi.com
Cc: Mel Gorman <mel@csn.ul.ie>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: [PATCH 3/3] Apply MPOL_BIND policy to two highest zones when highest is ZONE_MOVABLE
Date: Wed,  8 Aug 2007 17:16:05 +0100 (IST)	[thread overview]
Message-ID: <20070808161605.32320.40722.sendpatchset@skynet.skynet.ie> (raw)
In-Reply-To: <20070808161504.32320.79576.sendpatchset@skynet.skynet.ie>

The NUMA layer only supports the MPOL_BIND NUMA policy for the highest
zone. When ZONE_MOVABLE is configured with kernelcore=, the the highest
zone becomes ZONE_MOVABLE. The result is that the bind policy policies is
only applied to allocations like anonymous pages and page cache allocated
from ZONE_MOVABLE when the zone is used.

This patch applies policies to the two highest zones when the highest zone
is ZONE_MOVABLE. As ZONE_MOVABLE consists of pages from the highest "real"
zone, these two zones are equivalent in policy terms.

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

 include/linux/mempolicy.h |    2 +-
 mm/mempolicy.c            |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.23-rc1-mm2-010_use_zonelist/include/linux/mempolicy.h linux-2.6.23-rc1-mm2-015_treat_movable_highest/include/linux/mempolicy.h
--- linux-2.6.23-rc1-mm2-010_use_zonelist/include/linux/mempolicy.h	2007-08-08 11:35:09.000000000 +0100
+++ linux-2.6.23-rc1-mm2-015_treat_movable_highest/include/linux/mempolicy.h	2007-08-08 14:36:52.000000000 +0100
@@ -157,7 +157,7 @@ extern enum zone_type policy_zone;
 
 static inline void check_highest_zone(enum zone_type k)
 {
-	if (k > policy_zone)
+	if (k > policy_zone && k != ZONE_MOVABLE)
 		policy_zone = k;
 }
 
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.23-rc1-mm2-010_use_zonelist/mm/mempolicy.c linux-2.6.23-rc1-mm2-015_treat_movable_highest/mm/mempolicy.c
--- linux-2.6.23-rc1-mm2-010_use_zonelist/mm/mempolicy.c	2007-08-08 11:35:09.000000000 +0100
+++ linux-2.6.23-rc1-mm2-015_treat_movable_highest/mm/mempolicy.c	2007-08-08 14:36:52.000000000 +0100
@@ -151,7 +151,7 @@ static struct zonelist *bind_zonelist(no
 	   lower zones etc. Avoid empty zones because the memory allocator
 	   doesn't like them. If you implement node hot removal you
 	   have to fix that. */
-	k = policy_zone;
+	k = MAX_NR_ZONES - 1;
 	while (1) {
 		for_each_node_mask(nd, *nodes) { 
 			struct zone *z = &NODE_DATA(nd)->node_zones[k];

--
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:[~2007-08-08 16:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-08 16:15 [PATCH 0/3] Use one zonelist per node instead of multiple zonelists v2 Mel Gorman
2007-08-08 16:15 ` [PATCH 1/3] Use zonelists instead of zones when direct reclaiming pages Mel Gorman
2007-08-08 17:38   ` Christoph Lameter
2007-08-08 21:06     ` Mel Gorman
2007-08-08 16:15 ` [PATCH 2/3] Use one zonelist that is filtered instead of multiple zonelists Mel Gorman
2007-08-08 17:46   ` Christoph Lameter
2007-08-08 21:10     ` Mel Gorman
2007-08-08 23:28       ` Christoph Lameter
2007-08-08 16:16 ` Mel Gorman [this message]
2007-08-08 17:36 ` [PATCH 0/3] Use one zonelist per node instead of multiple zonelists v2 Christoph Lameter
2007-08-08 18:30   ` Lee Schermerhorn
2007-08-08 21:44     ` Mel Gorman
2007-08-08 22:40       ` Lee Schermerhorn
2007-08-08 23:37         ` Christoph Lameter
2007-08-09 14:47         ` Mel Gorman
2007-08-08 23:35       ` Christoph Lameter
2007-08-08 21:04   ` Mel Gorman
2007-08-08 23:26     ` Christoph Lameter
2007-08-09 20:19 ` Andrew Morton
2007-08-09 20:33   ` Christoph Lameter
2007-08-09 20:51   ` Mel Gorman
2007-08-09 21:20   ` Andi Kleen
2007-08-09 21:40     ` Christoph Lameter

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=20070808161605.32320.40722.sendpatchset@skynet.skynet.ie \
    --to=mel@csn.ul.ie \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pj@sgi.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