hg: hsx/hotspot-gc/hotspot: 2 new changesets
igor.veresov at oracle.com
Tue Aug 16 10:31:36 PDT 2011
The MAP_NORESERVE calls are supposed to be used only to reserve address space. When the heap gets expanded into this space we do mmap again, this time with the swap reservation (see os::commit_memory()). If that mmap fails, the VM notices that and reacts accordingly (like aborting the expansion attempt).
On Wednesday, August 10, 2011 at 8:09 AM, Florian Weimer wrote:
> * Ramki Ramakrishna:
> > I couldn't tell from the subsequent discussion, if this is by design
> > in Linux or an inadvertent bug (at least the Linux man page is mum on
> > the swap reservation semantics of MADV_DONTNEED; Solaris does not lose
> > page reservations on an madvise; so we'll have to defer to people
> > familiar with the Linux kernel to interpret intentions and semantics
> > here).
> In Linux, Hotspot should not use MAP_NORESERVE, but map with PROT_NONE
> initially and upgrade that to PROT_READ | PROT_WRITE (using mprotect) as
> heap usage grows. Then MADV_DONTNEED will do the right thing with
> regards to swap reservation. IIRC, MAP_NORESERVE results in a SIGSEGV
> signal which Hotspot cannot handle properly at the moment.
> Florian Weimer <fweimer at bfk.de (mailto:fweimer at bfk.de)>
> BFK edv-consulting GmbH http://www.bfk.de/
> Kriegsstraße 100 tel: +49-721-96201-1
> D-76133 Karlsruhe fax: +49-721-96201-99
More information about the hotspot-gc-dev