Deallocating memory pages
Jon Masamitsu
jon.masamitsu at oracle.com
Tue Feb 12 16:09:07 UTC 2013
On 02/11/13 17:20, Hiroshi Yamauchi wrote:
>> We talked about it some. I think the main question is what happens
>> in a situation that is tight on physical memory.
>> What happens when a page is deallocated
>> in this way with madvise and then the page is touched again and all
>> the physical memory on the system is in use? Does the system just
>> start paging? Have you seen this happen?
> Yes, it will just start paging. When a page is reallocated after being
> deallocated by madvise(MADV_DONTNEED), it is no different from a
> normal page allocation. That is, if there is no physical memory left
> on the system at that point, the system will page out some other pages
> to make room, just like when the system is out of physical memory in
> general. I confirmed this by asking around and running a small test.
>
>> The main impediment for moving forward on this is that we
>> would need to implement this on other platforms and generally
>> people don't have any spare time at this point
>> in the JDK 8 schedule.
>>
>> No one objected to the concept. Just some concerns about
>> possible unexpected behavior on other platforms. And who
>> could do the work.
> I see.
>
> I am not familiar with how you guys generally approach this sort of
> platform-specific features: Is it an option to have this as a
> platform-specific feature first and add the support for other
> platforms as we go? Or, it is not a good idea to have it at all until
> it supports all platforms at once?
I think it is highly preferable to implement on all platforms if
possible. Not
doing so leads too easily to a growing list of features that are platform
dependent when they don't have to be.
>
> On a related note, was there an (at least initially) platform-specific
> feature/patch that was contributed and extended later to all platforms
> (or left platform-specific) in the past? How was it handled, if any?
I don't have any experience in this regard to contributed patches.
Jon
More information about the hotspot-gc-dev
mailing list