From: Christoph Lameter <clameter@sgi.com>
To: akpm@osdl.org, torvalds@osdl.org
Cc: linux-ia64@vger.kernel.org, Christoph Lameter <clameter@sgi.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] ia64 zone reclaim
Date: Mon, 05 Dec 2005 19:01:09 +0000 [thread overview]
Message-ID: <20051205190109.12037.28157.sendpatchset@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20051205190104.12037.69672.sendpatchset@schroedinger.engr.sgi.com>
IA64 zone reclaim
Set up a zone reclaim function for IA64. The zone reclaim function will
reclaim easily reclaimable pages. Off node allocations will occur if no
easily reclaimable pages exist anymore.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.15-rc4/arch/ia64/mm/numa.c
=================================--- linux-2.6.15-rc4.orig/arch/ia64/mm/numa.c 2005-11-30 22:25:15.000000000 -0800
+++ linux-2.6.15-rc4/arch/ia64/mm/numa.c 2005-12-05 10:12:14.000000000 -0800
@@ -17,6 +17,7 @@
#include <linux/node.h>
#include <linux/init.h>
#include <linux/bootmem.h>
+#include <linux/swap.h>
#include <asm/mmzone.h>
#include <asm/numa.h>
@@ -71,3 +72,17 @@ int early_pfn_to_nid(unsigned long pfn)
return 0;
}
#endif
+
+/*
+ * Remove easily reclaimable local pages if watermarks would prevent a
+ * local allocation.
+ */
+int arch_zone_reclaim(struct zone *z, gfp_t mask,
+ unsigned int order)
+{
+ if (z->zone_pgdat->node_id = numa_node_id()) {
+ if (zone_reclaim(z, mask, 0, 0) > (1 << order))
+ return 1;
+ }
+ return 0;
+}
Index: linux-2.6.15-rc4/arch/ia64/Kconfig
=================================--- linux-2.6.15-rc4.orig/arch/ia64/Kconfig 2005-11-30 22:25:15.000000000 -0800
+++ linux-2.6.15-rc4/arch/ia64/Kconfig 2005-12-03 13:30:27.000000000 -0800
@@ -338,6 +338,10 @@ config HAVE_ARCH_EARLY_PFN_TO_NID
def_bool y
depends on NEED_MULTIPLE_NODES
+config ARCH_ZONE_RECLAIM
+ def_bool y
+ depends on NUMA
+
config IA32_SUPPORT
bool "Support for Linux/x86 binaries"
help
next prev parent reply other threads:[~2005-12-05 19:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-05 19:01 [PATCH 1/3] Arch specific zone reclaim framework Christoph Lameter
2005-12-05 19:01 ` Christoph Lameter [this message]
2005-12-05 19:01 ` [PATCH 3/3] Remove debris from old zone reclaim Christoph Lameter
2005-12-05 19:11 ` [PATCH 1/3] Arch specific zone reclaim framework Christoph Hellwig
2005-12-05 19:24 ` Christoph Lameter
2005-12-06 15:43 ` Andi Kleen
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=20051205190109.12037.28157.sendpatchset@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=akpm@osdl.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox