* [Patch:RFC] New zone ZONE_EASY_RECLAIM[5/5]
@ 2005-11-10 10:41 Yasunori Goto
0 siblings, 0 replies; only message in thread
From: Yasunori Goto @ 2005-11-10 10:41 UTC (permalink / raw)
To: linux-mm, Linux Hotplug Memory Support; +Cc: Nick Piggin, Mel Gorman
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/include/linux/mmzone.h
===================================================================
--- new_zone.orig/include/linux/mmzone.h 2005-11-09 16:40:29.000000000 +0900
+++ new_zone/include/linux/mmzone.h 2005-11-09 16:52:44.000000000 +0900
@@ -372,6 +372,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);
@@ -387,6 +392,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/page_alloc.c
===================================================================
--- new_zone.orig/mm/page_alloc.c 2005-11-09 16:40:29.000000000 +0900
+++ new_zone/mm/page_alloc.c 2005-11-09 16:40:33.000000000 +0900
@@ -2379,13 +2379,13 @@ static void setup_per_zone_pages_min(voi
/* 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
--
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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-11-10 10:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-10 10:41 [Patch:RFC] New zone ZONE_EASY_RECLAIM[5/5] Yasunori Goto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox