RFR: 8245203/8245204/8245208: ZGC: Don't hold the ZPageAllocator lock while committing/uncommitting memory

Per Liden per.liden at oracle.com
Mon Jun 1 20:08:47 UTC 2020


On 6/1/20 7:06 PM, Per Liden wrote:
> 
> On 6/1/20 7:32 AM, Per Liden wrote:
>> On 5/18/20 11:23 PM, Per Liden wrote:
>> [...]
>>> 3) 8245208: ZGC: Don't hold the ZPageAllocator lock while 
>>> committing/uncommitting memory
>>>
>>> We're currently holding the ZPageAllocator lock while performing a 
>>> number of expensive operations, such as committing and uncommitting 
>>> memory. This can have a very negative impact on latency, for example, 
>>> when a Java thread is trying to allocate a page from the page cache 
>>> while the ZUncommitter thread is uncommitting a portion of the heap.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8245208
>>> Webrev: http://cr.openjdk.java.net/~pliden/8245208/webrev.0
>>
> 
> Another update, after receiving some more comments from Stefan and Erik:
> 
> * 8245208: ZGC: Don't hold the ZPageAllocator lock while 
> committing/uncommitting memory
> Full: http://cr.openjdk.java.net/~pliden/8245208/webrev.2/
> Diff: http://cr.openjdk.java.net/~pliden/8245208/webrev.2-diff/

Just a heads up. I found a nicer way to structure the uncommit_run() 
function and updated the webrev in-place.

cheers,
Per

> 
> * 8246220: ZGC: Introduce ZUnmapper to asynchronous unmap pages
> Full: http://cr.openjdk.java.net/~pliden/8246220/webrev.1/
> Diff: http://cr.openjdk.java.net/~pliden/8246220/webrev.1-diff/
> 
> 
> ... and the above patches sits on top of these, which have not been 
> modified in this round:
> 
> * 8246265: ZGC: Introduce ZConditionLock
> http://cr.openjdk.java.net/~pliden/8246265/webrev.0/
> 
> * 8245204: ZGC: Introduce ZListRemoveIterator
> http://cr.openjdk.java.net/~pliden/8245204/webrev.0/
> 
> * 8245203: ZGC: Don't track size in ZPhysicalMemoryBacking
> http://cr.openjdk.java.net/~pliden/8245203/webrev.0/
> 
> cheers,
> Per



More information about the hotspot-gc-dev mailing list