RFR (S): 8067469: G1 ignores AlwaysPreTouch

David Holmes david.holmes at oracle.com
Thu Dec 18 00:17:44 UTC 2014


On 17/12/2014 11:42 PM, Thomas Schatzl wrote:
> Hi David,
>
> On Wed, 2014-12-17 at 12:18 +1000, David Holmes wrote:
>> Hi Thomas,
>>
>> On 16/12/2014 10:23 PM, Thomas Schatzl wrote:
>>> Hi all,
>>>
>>>     can I have reviews for the following small change?
>>>
>>> It adds pre-touching of allocated memory in G1, which has been forgotten
>>> to be implemented when changing this code in JDK-8038423.
>>>
>>> This change adds this and refactors the pre-touch code to a single
>>> method in the os class.
>>>
>>> CC'ed runtime since it changes code in os.hpp/cpp.
>>
>> Just looking at that, we seem to be assuming/requiring that start and
>> end are suitably page aligned and/or an integral number of pages apart -
>> otherwise for an arbitrary pair of addresses it seems we could fail to
>> touch the page containing end.
>
>    this is indeed a problem. And we cannot assert this because code doing
> the pre-touching and now calling this method, actually pass unaligned
> (end) addresses.
>
> The code to commit memory also may pass unaligned memory sizes (although
> I guess the OS will round up anyway), so I think we should not align
> ourselves here either.
>
> I filed JDK-8067785 for that.

Ok.

> I added a comment about this for now, new webrev at
> http://cr.openjdk.java.net/~tschatzl/8067469/webrev.1/
> diff at
> http://cr.openjdk.java.net/~tschatzl/8067469/webrev.0_to_1/
>
> I also changed the actual access to what Erik suggested to be easier
> understandable.

Ok again.

Thanks,
David

> Thanks,
>    Thomas
>
>



More information about the hotspot-gc-dev mailing list