From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: kosaki.motohiro@jp.fujitsu.com,
Marcelo Tosatti <marcelo@kvack.org>,
Daniel Spang <daniel.spang@gmail.com>,
Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: [RFC][PATCH 7/8] mem_notify v5: ignore very small zone for prevent incorrect low mem notify.
Date: Thu, 24 Jan 2008 13:24:48 +0900 [thread overview]
Message-ID: <20080124132355.1775.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <20080124130348.1760.KOSAKI.MOTOHIRO@jp.fujitsu.com>
on X86, ZONE_DMA is very very small.
it cause undesirable low mem notification.
It should ignored.
but on other some architecture, ZONE_DMA have 4GB.
4GB is large as it is not possible to ignored.
therefore, ignore or not is decided by zone size.
ChangeLog:
v5: new
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
include/linux/mem_notify.h | 3 +++
mm/page_alloc.c | 6 +++++-
2 files changed, 8 insertions(+), 1 deletion(-)
Index: b/include/linux/mem_notify.h
===================================================================
--- a/include/linux/mem_notify.h 2008-01-23 22:06:04.000000000 +0900
+++ b/include/linux/mem_notify.h 2008-01-23 22:08:02.000000000 +0900
@@ -22,6 +22,9 @@ static inline void memory_pressure_notif
unsigned long target;
unsigned long pages_high, pages_free, pages_reserve;
+ if (unlikely(zone->mem_notify_status == -1))
+ return;
+
if (pressure) {
target = atomic_long_read(&last_mem_notify) + MEM_NOTIFY_FREQ;
if (likely(time_before(jiffies, target)))
Index: b/mm/page_alloc.c
===================================================================
--- a/mm/page_alloc.c 2008-01-23 22:07:57.000000000 +0900
+++ b/mm/page_alloc.c 2008-01-23 22:08:02.000000000 +0900
@@ -3470,7 +3470,11 @@ static void __meminit free_area_init_cor
zone->zone_pgdat = pgdat;
zone->prev_priority = DEF_PRIORITY;
- zone->mem_notify_status = 0;
+
+ if (zone->present_pages < (pgdat->node_present_pages / 10))
+ zone->mem_notify_status = -1;
+ else
+ zone->mem_notify_status = 0;
zone_pcp_init(zone);
INIT_LIST_HEAD(&zone->active_list);
--
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>
next prev parent reply other threads:[~2008-01-24 4:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 4:18 [RFC][PATCH 0/8] mem_notify v5 KOSAKI Motohiro
2008-01-24 4:19 ` [RFC][PATCH 1/8] mem_notify v5: introduce poll_wait_exclusive() new API KOSAKI Motohiro
2008-01-24 4:20 ` [RFC][PATCH 2/8] mem_notify v5: introduce wake_up_locked_nr() " KOSAKI Motohiro
2008-01-24 4:21 ` [RFC][PATCH 3/8] mem_notify v5: introduce /dev/mem_notify new device (the core of this patch series) KOSAKI Motohiro
2008-01-24 12:19 ` Daniel Spång
2008-01-25 3:33 ` KOSAKI Motohiro
2008-01-24 4:22 ` [RFC][PATCH 4/8] mem_notify v5: memory_pressure_notify() caller KOSAKI Motohiro
2008-01-24 4:22 ` [RFC][PATCH 5/8] mem_notify v5: add new mem_notify field to /proc/zoneinfo KOSAKI Motohiro
2008-01-24 4:23 ` [RFC][PATCH 6/8] mem_notify v5: (optional) fixed incorrect shrink_zone KOSAKI Motohiro
2008-01-24 4:24 ` KOSAKI Motohiro [this message]
2008-01-24 4:26 ` [RFC][PATCH 8/8] mem_notify v5: support fasync feature KOSAKI Motohiro
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=20080124132355.1775.KOSAKI.MOTOHIRO@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=daniel.spang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=marcelo@kvack.org \
--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