From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: "\"Daniel Sp蚣g\"" <daniel.spang@gmail.com>
Cc: kosaki.motohiro@jp.fujitsu.com, Rik van Riel <riel@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Marcelo Tosatti <marcelo@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH 4/5] memory_pressure_notify() caller
Date: Thu, 17 Jan 2008 12:26:58 +0900 [thread overview]
Message-ID: <20080117120112.11CE.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <cfd9edbf0801160303s53237b81yb9d5e374c16cd006@mail.gmail.com>
Hi Daniel
> > Thank you for good point out!
> > Could you please post your test program and reproduced method?
>
> Sure:
>
> 1. Fill almost all available memory with page cache in a system without swap.
> 2. Run attached alloc-test program.
> 3. Notification fires when page cache is reclaimed.
Unfortunately, I can't reproduce it.
my machine
CPU: Pentium4 2.8GHz with HT
memory: 512M
1. I doubt ZONE_DMA, please shipment ignore zone_dma patch(below).
2. Could you please send your .config and /etc/sysctl.conf?
I hope more reproduce challenge.
thanks.
- kosaki
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: linux-2.6.24-rc6-mm1-memnotify/include/linux/mem_notify.h
===================================================================
--- linux-2.6.24-rc6-mm1-memnotify.orig/include/linux/mem_notify.h
2008-01-16 21:31:09.000000000 +0900
+++ linux-2.6.24-rc6-mm1-memnotify/include/linux/mem_notify.h
2008-01-16 21:34:24.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: linux-2.6.24-rc6-mm1-memnotify/mm/page_alloc.c
===================================================================
--- linux-2.6.24-rc6-mm1-memnotify.orig/mm/page_alloc.c 2008-01-13
19:50:27.000000000 +0900
+++ linux-2.6.24-rc6-mm1-memnotify/mm/page_alloc.c 2008-01-16
21:41:58.000000000 +0900
@@ -3467,7 +3467,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-17 3:26 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-15 0:52 [RFC][PATCH 0/5] mem notifications v4 KOSAKI Motohiro
2008-01-15 0:59 ` [RFC][PATCH 1/5] introduce poll_wait_exclusive() new API KOSAKI Motohiro
2008-01-15 1:00 ` [RFC][PATCH 2/5] introduce wake_up_locked_nr() " KOSAKI Motohiro
2008-01-15 1:01 ` [RFC][PATCH 3/5] add /dev/mem_notify device KOSAKI Motohiro
2008-01-15 1:08 ` Randy Dunlap
2008-01-15 1:20 ` KOSAKI Motohiro
2008-01-15 1:24 ` KOSAKI Motohiro
2008-01-15 2:10 ` KAMEZAWA Hiroyuki
2008-01-15 2:20 ` KOSAKI Motohiro
2008-01-15 2:56 ` Rik van Riel
2008-01-15 10:46 ` Alan Cox
2008-01-15 10:59 ` KOSAKI Motohiro
2008-01-15 11:20 ` Alan Cox
2008-01-15 11:48 ` KOSAKI Motohiro
2008-01-15 13:42 ` Alan Cox
2008-01-16 2:43 ` KOSAKI Motohiro
2008-01-15 12:05 ` Marcelo Tosatti
2008-01-15 13:42 ` Alan Cox
2008-01-15 22:16 ` Pavel Machek
2008-01-16 1:57 ` KOSAKI Motohiro
2008-01-16 4:13 ` Marcelo Tosatti
2008-01-16 11:42 ` Pavel Machek
2008-01-16 11:51 ` Daniel Spång
2008-01-17 3:04 ` KOSAKI Motohiro
2008-01-15 1:02 ` [RFC][PATCH 4/5] memory_pressure_notify() caller KOSAKI Motohiro
2008-01-15 2:06 ` KAMEZAWA Hiroyuki
2008-01-15 2:37 ` KOSAKI Motohiro
2008-01-15 3:00 ` KAMEZAWA Hiroyuki
2008-01-15 3:08 ` KOSAKI Motohiro
2008-01-15 22:55 ` Daniel Spång
2008-01-15 22:59 ` Rik van Riel
2008-01-15 23:39 ` Daniel Spång
2008-01-16 1:48 ` KOSAKI Motohiro
2008-01-16 11:03 ` Daniel Spång
2008-01-17 3:26 ` KOSAKI Motohiro [this message]
2008-01-18 10:24 ` Daniel Spång
2008-01-18 10:30 ` KOSAKI Motohiro
2008-01-15 1:03 ` [RFC][PATCH 5/5] /proc/zoneinfo enhancement KOSAKI Motohiro
2008-01-15 10:44 ` Alan Cox
2008-01-15 10:49 ` 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=20080117120112.11CE.KOSAKI.MOTOHIRO@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--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