This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Question about madvise(DONTNEED) in glibc malloc
- From: Rich Felker <dalias at aerifal dot cx>
- To: KOSAKI Motohiro <kosaki dot motohiro at gmail dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 15 Apr 2013 00:28:09 -0400
- Subject: Re: Question about madvise(DONTNEED) in glibc malloc
- References: <516ADB3C dot 9040805 at gmail dot com>
On Sun, Apr 14, 2013 at 09:37:16AM -0700, KOSAKI Motohiro wrote:
> Hi all,
>
> Now, we linux MM folks discuss are discussing about new memory
> discarding feature. (https://lkml.org/lkml/2013/3/12/105). The
> motivation is similar wtih MADV_FREE, but more efficient.
> (http://lwn.net/Articles/230799)
If you're following this, do you know if vrange(VRANGE_NOVOLATILE) has
failure cases? This makes a big difference to how usable it is by
malloc implementations. madvise re-mmapping new zero pages over the
range are nice in that the range is not using physical memory, but
still remains committed and immediately usable without any risk of
failure to get it back. If vrange can fail to "get back" the range,
this makes it a lot harder to use robustly.
Rich