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: [PATCH] mem notifications v3
Date: Fri, 28 Dec 2007 10:44:57 +0900 [thread overview]
Message-ID: <20071228103819.7F20.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <20071227201311.GA14995@dmt>
Hi Marcelo-san
> > > + pages_reserve += zone->lowmem_reserve[MAX_NR_ZONES-1];
> >
> > Hmm...
> > may be, don't works well.
> >
> > MAX_NR_ZONES determined at compile time and determined by distribution vendor.
> > but real highest zone is determined by box total memory.
>
> That is OK because the calculation of lowmem reserves will take into account
> all zones (mm/page_alloc.c::setup_per_zone_lowmem_reserve).
really?
sorry, I will check again.
> But it might be better to use the precalculated totalreserve_pages instead.
Hmm...
unfortunately, accumulate of all zone memory is incompatible to NUMA awareness.
please think again.
> > > + if (pages_free < (pages_high+pages_reserve)*2)
> > > + val = POLLIN;
> >
> > why do you choice fomula of (pages_high+pages_reserve)*2 ?
>
> Just to make sure its not sending a spurious notification in the case the system
> has enough free memory already.
Can I think "*2" is your experimental rule?
if so, I agree your experience.
> > > -static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
> > > +static bool shrink_active_list(unsigned long nr_pages, struct zone *zone,
> > > struct scan_control *sc, int priority)
> >
> > unnecessary type change.
> > if directly call mem_notify_userspace() in shrink_active_list, works well too.
> > because notify rate control can implement by mem_notify_userspace() and mem_notify_poll().
>
> Yes, and doing that should also guarantee that the notification is sent
> before swapout is performed (right now it sends the notification after
> shrink_inactive_list(), which is performing swapout).
Agreed.
- 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>
prev parent reply other threads:[~2007-12-28 1:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-24 20:32 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
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 [this message]
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=20071228103819.7F20.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