Greetings, I've dedusted the guest page hinting patches and ported them to todays upstream git tree. There is one reject if applied to 2.6.24-rc5-mm1 but that is easy to fix. The code stills works as expected on my test system. Our z/VM performance team recently published a report on guest page hinting vs. the ballooner approach on SLES10 for a farm of web servers. The code on SLES10 differs a bit from the upstream variant but the performance results should be still valid. You will find the report here: http://www.vm.ibm.com/perf/reports/zvm/html/530cmm.html (the VMRM-CMM the web page speaks about is the balloon approach, CMMA is the guest page hinting). Both approaches to the memory overcommit problem show comparable benefits for this workload, with an advantage for guest page hinting for large number of guests. For other workloads your mileage may vary. The main benefit for guest page hinting vs. the ballooner is that there is no need for a monitor that keeps track of the memory usage of all the guests, a complex algorithm that calculates the working set sizes and for the calls into the guest kernel to control the size of the balloons. The host just does normal LRU based paging. If the host picks one of the pages the guest can recreate, the host can throw it away instead of writing it to the paging device. Simple and elegant. The main disadvantage is the added complexity that is introduced to the guests memory management code to do the page state changes and to deal with discard faults. The last versions of the patches do not differ much, I consider the code to be stable. My question now is how to proceed with the code. I sure would love to see the code going upstream some day but that depends on the mm developers as the code adds complexity that needs to be supported. If the general feeling is that the advantages of this approach do not warrent for the added complexity this will likely be the last time you will hear about guest page hinting. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.
Martin Schwidefsky
2008-Mar-12 13:21 UTC
[patch 1/6] Guest page hinting: core + volatile page cache.
An embedded and charset-unspecified text was scrubbed... Name: 001-hva-core.diff Url: http://lists.linux-foundation.org/pipermail/virtualization/attachments/20080312/2eac345e/attachment.txt
Martin Schwidefsky
2008-Mar-12 13:21 UTC
[patch 2/6] Guest page hinting: volatile swap cache.
An embedded and charset-unspecified text was scrubbed... Name: 002-hva-swap.diff Url: http://lists.linux-foundation.org/pipermail/virtualization/attachments/20080312/36d61a1e/attachment.txt
An embedded and charset-unspecified text was scrubbed... Name: 003-hva-mlock.diff Url: http://lists.linux-foundation.org/pipermail/virtualization/attachments/20080312/bf0890c5/attachment.txt
Martin Schwidefsky
2008-Mar-12 13:21 UTC
[patch 4/6] Guest page hinting: writable page table entries.
An embedded and charset-unspecified text was scrubbed... Name: 004-hva-prot.diff Url: http://lists.linux-foundation.org/pipermail/virtualization/attachments/20080312/35dbc5a3/attachment.txt
Martin Schwidefsky
2008-Mar-12 13:21 UTC
[patch 5/6] Guest page hinting: minor fault optimization.
An embedded and charset-unspecified text was scrubbed... Name: 005-hva-nohv.diff Url: http://lists.linux-foundation.org/pipermail/virtualization/attachments/20080312/804e635a/attachment.txt
An embedded and charset-unspecified text was scrubbed... Name: 006-hva-s390.diff Url: http://lists.linux-foundation.org/pipermail/virtualization/attachments/20080312/d2bc4596/attachment.txt
On Thursday 13 March 2008 00:21:32 Martin Schwidefsky wrote:> My question now is how to proceed with the code. I sure > would love to see the code going upstream some day but that depends on > the mm developers as the code adds complexity that needs to be supported.Well, I want this feature, but I agree about complexity. AFAICT, the trivial subset of this is the hinting of Unused pages. It seems that would buy us something, and perhaps be a stepping stone to full page hinting? Cheers, Rusty.
On Wed, 12 Mar 2008, Martin Schwidefsky wrote:> Greetings, > I've dedusted the guest page hinting patches and ported them to todays > upstream git tree. There is one reject if applied to 2.6.24-rc5-mm1 but > that is easy to fix. The code stills works as expected on my test system. > > Our z/VM performance team recently published a report on guest page > hinting vs. the ballooner approach on SLES10 for a farm of web servers. > The code on SLES10 differs a bit from the upstream variant but the > performance results should be still valid. You will find the report > here: > > http://www.vm.ibm.com/perf/reports/zvm/html/530cmm.html > > (the VMRM-CMM the web page speaks about is the balloon approach, > CMMA is the guest page hinting). > > Both approaches to the memory overcommit problem show comparable benefits > for this workload, with an advantage for guest page hinting for large > number of guests. For other workloads your mileage may vary. > > The main benefit for guest page hinting vs. the ballooner is that there > is no need for a monitor that keeps track of the memory usage of all the > guests, a complex algorithm that calculates the working set sizes and for > the calls into the guest kernel to control the size of the balloons. > The host just does normal LRU based paging. If the host picks one of the > pages the guest can recreate, the host can throw it away instead of writing > it to the paging device. Simple and elegant. > The main disadvantage is the added complexity that is introduced to the > guests memory management code to do the page state changes and to deal > with discard faults. > > The last versions of the patches do not differ much, I consider the code > to be stable. My question now is how to proceed with the code. I sure > would love to see the code going upstream some day but that depends on > the mm developers as the code adds complexity that needs to be supported. > If the general feeling is that the advantages of this approach do not > warrent for the added complexity this will likely be the last time you > will hear about guest page hinting.Oh, that would be such a shame. Your guest page hinting patches remind me of that childhood thrill, when once a year the circus comes to town ;) But seriously, I'm ashamed to see my name in the Cc list: it would be very unfair if your patches never made it in, just because I've failed to find the time to wrap my own puny brain around them. It's very encouraging to see Jeremy and Rusty weighing in. I hope Zach will too, and I've added Andrea: their support would count a lot. You have Nick on the list, good, I've added Christoph and Peter (if you do resend, linux-mm might prove more useful than linux-kernel). With support from rival virtualizers, I do think you've a good chance of getting in. Hugh
On Thu, 2008-03-13 at 16:57 +0000, Hugh Dickins wrote:> > The last versions of the patches do not differ much, I consider the code > > to be stable. My question now is how to proceed with the code. I sure > > would love to see the code going upstream some day but that depends on > > the mm developers as the code adds complexity that needs to be supported. > > If the general feeling is that the advantages of this approach do not > > warrent for the added complexity this will likely be the last time you > > will hear about guest page hinting. > > Oh, that would be such a shame. Your guest page hinting patches remind > me of that childhood thrill, when once a year the circus comes to town ;) > > But seriously, I'm ashamed to see my name in the Cc list: it would > be very unfair if your patches never made it in, just because I've > failed to find the time to wrap my own puny brain around them.It is an effort to get you head around it the first time. It gets easiert the more you talk about it :-)> It's very encouraging to see Jeremy and Rusty weighing in. I hope > Zach will too, and I've added Andrea: their support would count a lot. > You have Nick on the list, good, I've added Christoph and Peter > (if you do resend, linux-mm might prove more useful than linux-kernel).Grr, did I really forgot to copy linux-mm?!? (..insert you favourite four letter word here..). I absolutely intended to copy linux-mm but somehow replaced it with linux-s390.> With support from rival virtualizers, > I do think you've a good chance of getting in.Yes, it would be great if we can find another user for it. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.
Apparently Analagous Threads
- [patch 0/6] Guest page hinting version 6.
- [patch 0/6] Guest page hinting version 7.
- [patch 0/6] Guest page hinting version 7.
- [patch 0/6] Guest page hinting version 7.
- [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled