Deallocating memory pages
Hiroshi Yamauchi
yamauchi at google.com
Mon Jan 28 23:28:01 UTC 2013
On Fri, Jan 25, 2013 at 3:29 PM, Vitaly Davidovich <vitalyd at gmail.com>wrote:
> Hiroshi,
>
> I'll second your explanation for #1 - we also have some server workloads
> that fluctuate.
>
> Since the kernel will page out memory if need arises on its own, the main
> benefit I'm seeing in your patch is that it removes the possibility that
> kernel will page out the wrong pages. That is, if it's using LRU page
> replacement (or whatever the latest heuristic might be) and GC just freed
> up those pages (but ended up marking them dirty in the process), then if
> kernel needs to swap out it may overlook these pages because they don't fit
> the replacement policy(I guess it also ensures that these pages don't need
> swap backing either). Otherwise, if the server app has not been using those
> extra pages for a while anyway, I'm thinking kernel will pick up on that.
>
> Is that right? Just want to make sure I understand.
>
Vitaly, do you mean that without this feature/patch, the kernel might
choose to swap out a page with valid data as opposed to a page that has
garbage data and would have been deallocated with this feature/patch if it
follows an LRU-like policy or something similar? If so, you are probably
right about that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20130128/4be92c94/attachment.htm>
More information about the hotspot-gc-dev
mailing list