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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080402154910.9588.KOSAKI.MOTOHIRO@jp.fujitsu.com>
Date:	Wed, 02 Apr 2008 16:31:27 +0900
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	"Tom May" <tom@...may.com>
Cc:	kosaki.motohiro@...fujitsu.com, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/8][for -mm] mem_notify v6

Hi Tom,

Thank you very useful comment.
that is very interesting.

> I tried it with a real-world program that, among other things, mmaps
> anonymous pages and touches them at a reasonable speed until it gets
> notified via /dev/mem_notify, releases most of them with
> madvise(MADV_DONTNEED), then loops to start the cycle again.
>
> What tends to happen is that I do indeed get notifications via
> /dev/mem_notify when the kernel would like to be swapping, at which
> point I free memory.  But the notifications come at a time when the
> kernel needs memory, and it gets the memory by discarding some Cached
> or Mapped memory (I can see these decreasing in /proc/meminfo with
> each notification).  With each mmap/notify/madvise cycle the Cached
> and Mapped memory gets smaller, until eventually while I'm touching
> pages the kernel can't find enough memory and will either invoke the
> OOM killer or return ENOMEM from syscalls.  This is precisely the
> situation I'm trying to avoid by using /dev/mem_notify.

Could you send your test program?
I can't reproduce that now, sorry.


> The criterion of "notify when the kernel would like to swap" feels
> correct, but in addition I seem to need something like "notify when
> cached+mapped+free memory is getting low".

Hmmm,
I think this idea is only useful when userland process call 
madvise(MADV_DONTNEED) periodically.

but I hope improve my patch and solve your problem.
if you don' mind, please help my testing ;)



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ