lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cfd9edbf0801160303s53237b81yb9d5e374c16cd006@mail.gmail.com>
Date:	Wed, 16 Jan 2008 12:03:49 +0100
From:	"Daniel SpÄng" <daniel.spang@...il.com>
To:	"KOSAKI Motohiro" <kosaki.motohiro@...fujitsu.com>
Cc:	"Rik van Riel" <riel@...hat.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	"Marcelo Tosatti" <marcelo@...ck.org>,
	"Andrew Morton" <akpm@...ux-foundation.org>
Subject: Re: [RFC][PATCH 4/5] memory_pressure_notify() caller

On 1/16/08, KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com> wrote:
> Hi Daniel
>
> > > > 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.
> > >
> > > Your issue may have more to do with the fact that the
> > > highmem zone is 128MB in size and some balancing issues
> > > between __alloc_pages and try_to_free_pages.
> >
> > I don't think so. I ran the test again without highmem and noticed the
> > same behaviour:
>
> 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.

Example:

$ cat /bigfile > /dev/null
$ cat /proc/meminfo
MemTotal:       895876 kB
MemFree:         94272 kB
Buffers:           884 kB
Cached:         782868 kB
SwapCached:          0 kB
Active:          15356 kB
Inactive:       778000 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       895876 kB
LowFree:         94272 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
AnonPages:        9624 kB
Mapped:           1352 kB
Slab:             4220 kB
SReclaimable:     1168 kB
SUnreclaim:       3052 kB
PageTables:        528 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:    447936 kB
Committed_AS:    28988 kB
VmallocTotal:   122872 kB
VmallocUsed:       904 kB
VmallocChunk:   121864 kB
$ ./test-alloc
---------
Got notification, allocated 90 MB
$ cat /proc/meminfo
MemTotal:       895876 kB
MemFree:        101960 kB
Buffers:           888 kB
Cached:         775200 kB
SwapCached:          0 kB
Active:          15356 kB
Inactive:       770336 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       895876 kB
LowFree:        101960 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:              28 kB
Writeback:           0 kB
AnonPages:        9624 kB
Mapped:           1352 kB
Slab:             4224 kB
SReclaimable:     1168 kB
SUnreclaim:       3056 kB
PageTables:        532 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:    447936 kB
Committed_AS:    28988 kB
VmallocTotal:   122872 kB
VmallocUsed:       904 kB
VmallocChunk:   121864 kB

Download attachment "alloc-test.c" of type "application/octet-stream" (1738 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ