From: Yasunori Goto <y-goto@jp.fujitsu.com>
To: linux-mm <linux-mm@kvack.org>,
Linux Hotplug Memory Support <lhms-devel@lists.sourceforge.net>
Cc: Joel Schopp <jschopp@austin.ibm.com>, linux-ia64@vger.kernel.org
Subject: [Patch] New zone ZONE_EASY_RECLAIM take 2[4/5]
Date: Mon, 28 Nov 2005 11:36:38 +0000 [thread overview]
Message-ID: <20051128200435.5D80.Y-GOTO@jp.fujitsu.com> (raw)
In-Reply-To: <20051128195854.5D78.Y-GOTO@jp.fujitsu.com>
This is for calculation of the watermark zone->pages_min/low/high.
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Index: new_zone_mm/include/linux/mmzone.h
=================================--- new_zone_mm.orig/include/linux/mmzone.h 2005-11-17 17:07:30.000000000 +0900
+++ new_zone_mm/include/linux/mmzone.h 2005-11-17 17:17:51.000000000 +0900
@@ -401,6 +401,11 @@ static inline struct zone *next_zone(str
#define for_each_zone(zone) \
for (zone = pgdat_list->node_zones; zone; zone = next_zone(zone))
+static inline int is_easy_reclaim_idx(int idx)
+{
+ return (idx = ZONE_EASY_RECLAIM);
+}
+
static inline int is_highmem_idx(int idx)
{
return (idx = ZONE_HIGHMEM);
@@ -416,6 +421,11 @@ static inline int is_normal_idx(int idx)
* to ZONE_{DMA/NORMAL/HIGHMEM/etc} in general code to a minimum.
* @zone - pointer to struct zone variable
*/
+static inline int is_easy_reclaim(struct zone *zone)
+{
+ return zone = zone->zone_pgdat->node_zones + ZONE_EASY_RECLAIM;
+}
+
static inline int is_highmem(struct zone *zone)
{
return zone = zone->zone_pgdat->node_zones + ZONE_HIGHMEM;
Index: new_zone_mm/mm/page_alloc.c
=================================--- new_zone_mm.orig/mm/page_alloc.c 2005-11-17 17:09:05.000000000 +0900
+++ new_zone_mm/mm/page_alloc.c 2005-11-17 17:17:51.000000000 +0900
@@ -2495,13 +2495,13 @@ void setup_per_zone_pages_min(void)
/* Calculate total number of !ZONE_HIGHMEM pages */
for_each_zone(zone) {
- if (!is_highmem(zone))
+ if (!is_highmem(zone) && !is_easy_reclaim(zone))
lowmem_pages += zone->present_pages;
}
for_each_zone(zone) {
spin_lock_irqsave(&zone->lru_lock, flags);
- if (is_highmem(zone)) {
+ if (is_highmem(zone) || is_easy_reclaim(zone)) {
/*
* Often, highmem doesn't need to reserve any pages.
* But the pages_min/low/high values are also used for
--
Yasunori Goto
next prev parent reply other threads:[~2005-11-28 11:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-28 11:36 [Patch] New zone ZONE_EASY_RECLAIM take 2[0/5] Yasunori Goto
2005-11-28 11:36 ` [Patch] New zone ZONE_EASY_RECLAIM take 2[1/5] Yasunori Goto
2005-11-28 11:36 ` [Patch] New zone ZONE_EASY_RECLAIM take 2[2/5] Yasunori Goto
2005-11-28 11:36 ` [Patch] New zone ZONE_EASY_RECLAIM take 2[3/5] Yasunori Goto
2005-11-28 11:36 ` Yasunori Goto [this message]
2005-11-28 11:36 ` [Patch] New zone ZONE_EASY_RECLAIM take 2[5/5] Yasunori Goto
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=20051128200435.5D80.Y-GOTO@jp.fujitsu.com \
--to=y-goto@jp.fujitsu.com \
--cc=jschopp@austin.ibm.com \
--cc=lhms-devel@lists.sourceforge.net \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-mm@kvack.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