From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Marcelo Tosatti <marcelo@kvack.org>
Cc: kosaki.motohiro@jp.fujitsu.com, linux-mm@kvack.org,
"Daniel Sp蚣g" <daniel.spang@gmail.com>,
"Rik van Riel" <riel@redhat.com>,
"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [RFC][patch 1/2] mem notifications v3 improvement for large system
Date: Fri, 28 Dec 2007 09:38:41 +0900 [thread overview]
Message-ID: <20071228092123.7F1D.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <20071227210456.GB14823@dmt>
Hi Marcelo-san
thank you for your advice.
> So something like the following sounds better:
>
> - have your poll_wait_exclusive() patch in place
> - pass a "status" parameter to mem_notify_userspace() and have it clear
> mem_notify_status in case status is zero, so to stop sending POLLIN to processes.
> - call mem_notify_userspace(0) from mm/vmscan.c when ZONE_NORMAL reclaim_mapped
> is false (that seems a good indication that VM is out of trouble).
> - test for mem_notify_status in mem_notify_poll(), but do not clear it.
> - at mem_notify_userspace(), use wake_up_nr(number of mem_notify users/10) (10
> meaning a small percentage of registered users).
feel nice idea.
OK. I will try it about new year.
> > + if (file_info->last_event == atomic_read(&mem_notify_event))
> > + goto out;
>
> What exactly are you trying to deal with by using last_event?
to be honest, read() and last_event is daniel-san's idea.
it is part of sysfs code in his patch.
my patch intent the same behavior as his.
1. read() method is deletable if you dislike.
I will delete at next post :)
2. last_event is not deletable, it is important.
when storong and long memory pressure,
notification received process call poll() again after own cache freed
but before out of trouble.
at that point, the process shold not wakeup because already memory freed.
(in other word, poll shold return 0.)
- kosaki
--
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:[~2007-12-28 0:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-24 20:32 [PATCH] mem notifications v3 Marcelo Tosatti
2007-12-25 3:47 ` KOSAKI Motohiro
2007-12-25 4:56 ` [RFC] add poll_wait_exclusive() API KOSAKI Motohiro
2007-12-27 21:05 ` Marcelo Tosatti
2007-12-25 8:31 ` [PATCH] mem notifications v3 KOSAKI Motohiro
2007-12-25 10:31 ` [RFC][patch 1/2] mem notifications v3 improvement for large system KOSAKI Motohiro
2007-12-27 21:04 ` Marcelo Tosatti
2007-12-28 0:38 ` KOSAKI Motohiro [this message]
2007-12-25 10:31 ` [RFC][patch 2/2] " KOSAKI Motohiro
2007-12-25 10:41 ` KOSAKI Motohiro
2007-12-27 4:49 ` [RFC][patch] mem_notify more faster reduce load average KOSAKI Motohiro
2007-12-27 20:13 ` [PATCH] mem notifications v3 Marcelo Tosatti
2007-12-28 1:44 ` 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=20071228092123.7F1D.KOSAKI.MOTOHIRO@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=daniel.spang@gmail.com \
--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