[LSF/MM TOPIC] Free Page Reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guests running on a KVM hypervisor don't normally have physical memory
assigned to them, instead the host allocates virtual memory for the guest.
As the guest uses memory, physical pages are faulted in to back the
virtual memory, and when under memory pressure the host can swap those
pages out to disk freeing them up for other uses. As a result, a guest may
suffer from performance degradation when the host memory is over-committed 
and under memory pressure since a guest's memory may be swapped to disk
when it next attempts to access it. In addition the memory pressure the
host is experiencing may not be genuine as some guests may no longer be
using the pages currently allocated to them. The current solution to this
is memory ballooning, however that requires manual intervention to trigger
and may result in performance degradation on the guest if it has need of
the memory being pulled into the balloon.

Free page hinting/reporting has been discussed as a solution to these
issues for some time with one of the earliest known mentions being back in
2011 at the KVM Forum[0]. The goal with free page reporting is to enable
memory over-commit while not taxing the resources on the system by
proactively freeing the unused memory from each guest instead of waiting
for the host to swap it out. The advantage is that unused guests can
return their memory resources to the host without the need of intervention
at the host level and avoid the costly overhead for writing or reading
that memory from disk.

I have been working on enabling a guest to notify the host of free or
unused pages, with v16 of the patch set being the most recent version[1].
The code itself has gone though a number of changes over the last year,
and prior to starting this work there has already been a documented
history[2] of others working on similar efforts.

The goals of the discussion would be:

- Identify any remaining gaps to be addressed in the current solution
- Discuss next steps, such as:
    - Applying proactive memory pressure in guests
    - Providing a mechanism to notify guest of need for memory pressure
    - Rebasing page hinting to make use of page reporting

[0]: https://www.linux-kvm.org/images/f/ff/2011-forum-memory-overcommit.pdf
[1]: https://lore.kernel.org/lkml/20200103210509.29237.18426.stgit@localhost.localdomain/
[2]: https://lore.kernel.org/lkml/29f43d5796feed0dec8e8bb98b187d9dac03b900.camel@xxxxxxxxxxxxxxx/





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux