Re: [RFC][PATCH 4/5] memory_pressure_notify() caller

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Daniel Spång
Date: Tuesday, January 15, 2008 - 3:55 pm

Hi,

On 1/15/08, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:


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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH 0/5] mem notifications v4, KOSAKI Motohiro, (Mon Jan 14, 5:52 pm)
[RFC][PATCH 1/5] introduce poll_wait_exclusive() new API , KOSAKI Motohiro, (Mon Jan 14, 5:59 pm)
[RFC][PATCH 2/5] introduce wake_up_locked_nr() new API, KOSAKI Motohiro, (Mon Jan 14, 6:00 pm)
[RFC][PATCH 3/5] add /dev/mem_notify device, KOSAKI Motohiro, (Mon Jan 14, 6:01 pm)
[RFC][PATCH 4/5] memory_pressure_notify() caller, KOSAKI Motohiro, (Mon Jan 14, 6:02 pm)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, Randy Dunlap, (Mon Jan 14, 6:08 pm)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, KOSAKI Motohiro, (Mon Jan 14, 6:20 pm)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, KOSAKI Motohiro, (Mon Jan 14, 6:24 pm)
Re: [RFC][PATCH 4/5] memory_pressure_notify() caller, KAMEZAWA Hiroyuki, (Mon Jan 14, 7:06 pm)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, KAMEZAWA Hiroyuki, (Mon Jan 14, 7:10 pm)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, KOSAKI Motohiro, (Mon Jan 14, 7:20 pm)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, Rik van Riel, (Mon Jan 14, 7:56 pm)
Re: [RFC][PATCH 4/5] memory_pressure_notify() caller, KAMEZAWA Hiroyuki, (Mon Jan 14, 8:00 pm)
Re: [RFC][PATCH 4/5] memory_pressure_notify() caller, KOSAKI Motohiro, (Mon Jan 14, 8:08 pm)
Re: [RFC][PATCH 5/5] /proc/zoneinfo enhancement, Alan Cox, (Tue Jan 15, 3:44 am)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, Alan Cox, (Tue Jan 15, 3:46 am)
Re: [RFC][PATCH 5/5] /proc/zoneinfo enhancement, KOSAKI Motohiro, (Tue Jan 15, 3:49 am)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, KOSAKI Motohiro, (Tue Jan 15, 3:59 am)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, Alan Cox, (Tue Jan 15, 4:20 am)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, KOSAKI Motohiro, (Tue Jan 15, 4:48 am)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, Marcelo Tosatti, (Tue Jan 15, 5:05 am)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, Alan Cox, (Tue Jan 15, 6:42 am)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, Alan Cox, (Tue Jan 15, 6:42 am)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, Pavel Machek, (Tue Jan 15, 3:16 pm)
Re: [RFC][PATCH 4/5] memory_pressure_notify() caller, Daniel Spång, (Tue Jan 15, 3:55 pm)
Re: [RFC][PATCH 4/5] memory_pressure_notify() caller, Rik van Riel, (Tue Jan 15, 3:59 pm)
Re: [RFC][PATCH 4/5] memory_pressure_notify() caller, Daniel Spång, (Tue Jan 15, 4:39 pm)
Re: [RFC][PATCH 4/5] memory_pressure_notify() caller, KOSAKI Motohiro, (Tue Jan 15, 6:48 pm)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, KOSAKI Motohiro, (Tue Jan 15, 6:57 pm)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, KOSAKI Motohiro, (Tue Jan 15, 7:43 pm)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, Marcelo Tosatti, (Tue Jan 15, 9:13 pm)
Re: [RFC][PATCH 4/5] memory_pressure_notify() caller, Daniel Spång, (Wed Jan 16, 4:03 am)
Re: [RFC][PATCH 3/5] add /dev/mem_notify device, KOSAKI Motohiro, (Wed Jan 16, 8:04 pm)
Re: [RFC][PATCH 4/5] memory_pressure_notify() caller, KOSAKI Motohiro, (Wed Jan 16, 8:26 pm)
Re: [RFC][PATCH 4/5] memory_pressure_notify() caller, KOSAKI Motohiro, (Fri Jan 18, 3:30 am)