Fwd: review(XXS): 7060842: UseNUMA crash with UseHugreTLBFS running SPECjvm2008

Igor Veresov igor.veresov at oracle.com
Wed Aug 3 14:47:07 PDT 2011

On 8/3/11 2:33 PM, Ramki Ramakrishna wrote:
> Yikes... a Linux man page i found does not say anything about swap
> reservation:
>     Do not expect access in the near future. (For the time being, the
>     application is finished with the given range, so the kernel can free
>     resources associated with it.) Subsequent accesses of pages in this
>     range will succeed, but will result either in re-loading of the
>     memory contents from the underlying mapped file (see *mmap*()) or
>     zero-fill-on-demand pages for mappings without an underlying file.

That's MADV_DONTNEED, we tried to use MADV_FREE, but there's nothing 
about it's semantics either with regard to reservations.
> Is there an understanding that this is a Linux bug? Or is "resources"
> above open to
> interpretation, including swap reservation? (Andrew Haley?)

I don't know if this is intentional. madvise() has notoriously different 
interpretations of its options under different OSes.

> Anyway, your change looks good, if only to get back to more reliable
> operation
> under tight memory situations?

Right. Thank you!

> PS: Igor, what does "louses" below (in yr email) mean in this context?

Eh, that's a typo, I meant "looses".


> Reviewed!
> -- ramki
> On 8/3/2011 1:55 PM, Igor Veresov wrote:
>> Resending to the right list.
>> -------- Original Message --------
>> Subject: review(XXS): 7060842: UseNUMA crash with UseHugreTLBFS
>> running SPECjvm2008
>> Date: Wed, 03 Aug 2011 13:40:17 -0700
>> From: Igor Veresov <igor.veresov at oracle.com>
>> To: hotspot-compiler-dev <hotspot-compiler-dev at openjdk.java.net>
>> It seems that madvise(MADV_FREE) breaks pages reservation semantics of
>> the the underlying segment. With tight memory constraints this would
>> cause a race for pages and a segfault if the JVM louses. The solution is
>> to revert back to the previous implementation of os::free_memory() that
>> used mmap().
>> Webrev: http://cr.openjdk.java.net/~iveresov/7060842/webrev.00/
>> Tested is gc test suite.
>> igor

More information about the hotspot-gc-dev mailing list