From: "Daniel Spång" <daniel.spang@gmail.com>
To: "KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
"Marcelo Tosatti" <marcelo@kvack.org>,
"Rik van Riel" <riel@redhat.com>,
"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH 4/5] memory_pressure_notify() caller
Date: Tue, 15 Jan 2008 23:55:17 +0100 [thread overview]
Message-ID: <cfd9edbf0801151455j48669850s7ea4fe589dbb9710@mail.gmail.com> (raw)
In-Reply-To: <20080115100124.117B.KOSAKI.MOTOHIRO@jp.fujitsu.com>
Hi,
On 1/15/08, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> the notification point to happen whenever the VM moves an
> anonymous page to the inactive list - this is a pretty good indication
> that there are unused anonymous pages present which will be very likely
> swapped out soon.
> + /* deal with the case where there is no
> + * swap but an anonymous page would be
> + * moved to the inactive list.
> + */
> + if (!total_swap_pages && reclaim_mapped &&
> + PageAnon(page))
> + inactivated_anon = 1;
As you know I have had some concerns regarding a too early
notification in a swapless system.
I did a test with a populated page cache in a swapless system:
$ cat /bigfile > /dev/null # populate page cache
$ cat /proc/meminfo
MemTotal: 1037040 kB
MemFree: 113976 kB
Buffers: 1068 kB
Cached: 907552 kB
SwapCached: 0 kB
Active: 11116 kB
Inactive: 903968 kB
HighTotal: 130992 kB
HighFree: 252 kB
LowTotal: 906048 kB
LowFree: 113724 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 36 kB
Writeback: 0 kB
AnonPages: 6484 kB
Mapped: 1216 kB
Slab: 4024 kB
SReclaimable: 864 kB
SUnreclaim: 3160 kB
PageTables: 444 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 518520 kB
Committed_AS: 18816 kB
VmallocTotal: 114680 kB
VmallocUsed: 904 kB
VmallocChunk: 113672 kB
Start to allocate memory, 10 MB every second, exit on notification.
$ cat /proc/meminfo # just after notification
MemTotal: 1037040 kB
MemFree: 123468 kB
Buffers: 876 kB
Cached: 897976 kB
SwapCached: 0 kB
Active: 12984 kB
Inactive: 892332 kB
HighTotal: 130992 kB
HighFree: 1064 kB
LowTotal: 906048 kB
LowFree: 122404 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 6484 kB
Mapped: 1220 kB
Slab: 4012 kB
SReclaimable: 864 kB
SUnreclaim: 3148 kB
PageTables: 448 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 518520 kB
Committed_AS: 18816 kB
VmallocTotal: 114680 kB
VmallocUsed: 904 kB
VmallocChunk: 113672 kB
The notification fires after only ~100 MB allocated, i.e., when page
reclaim is beginning to nag from page cache. Isn't this a bit early?
Repeating the test with swap enabled results in a notification after
~600 MB allocated, which is more reasonable and just before the system
starts to swap.
Cheers,
Daniel
next prev parent reply other threads:[~2008-01-15 22:55 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 [this message]
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
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=cfd9edbf0801151455j48669850s7ea4fe589dbb9710@mail.gmail.com \
--to=daniel.spang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@jp.fujitsu.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
all inboxes | Powered by JetHome®