Su, Disheng
2008-Feb-01 06:24 UTC
[Xen-devel] [PATCH 4/4] Enable VirtualPC 2007 run on top of XEN: add_write_for_data_pages
There are two cases for CR0.wp emulation: one is for page table write emulation, another is for data page write emulation. We found more than 100,000 page faults per second for the later case. This case can be optimized by setting _PAGE_RW bit for this ReadOnly data page when guest CR0.wp is 0, and remove it when CR0.wp is 1. With this patch, page faults is reduced to about 10,000 at average. Reviewed-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Disheng Su <disheng.su.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2008-Feb-01 09:40 UTC
Re: [Xen-devel] [PATCH 4/4] Enable VirtualPC 2007 run on top of XEN: add_write_for_data_pages
Hi, At 14:24 +0800 on 01 Feb (1201875871), Su, Disheng wrote:> There are two cases for CR0.wp emulation: one is for page table write > emulation, another is for data page write emulation. We found more than > 100,000 page faults per second for the later case. This case can be > optimized by setting _PAGE_RW bit for this ReadOnly data page when guest > CR0.wp is 0, and remove it when CR0.wp is 1. With this patch, page > faults is reduced to about 10,000 at average.Unfortunately, this isn''t safe for SMP guests -- vcpu0''s wp bit being clear shouldn''t let vcpu1 ignore the _PAGE_RW bits on shared mappings. Sheers, Tim. -- Tim Deegan <Tim.Deegan@citrix.com> Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Su, Disheng
2008-Feb-01 10:06 UTC
RE: [Xen-devel] [PATCH 4/4] Enable VirtualPC 2007 run on top of XEN: add_write_for_data_pages
Tim Deegan wrote:> Hi, > > At 14:24 +0800 on 01 Feb (1201875871), Su, Disheng wrote: >> There are two cases for CR0.wp emulation: one is for page table write >> emulation, another is for data page write emulation. We found more >> than 100,000 page faults per second for the later case. This case >> can be optimized by setting _PAGE_RW bit for this ReadOnly data page >> when guest CR0.wp is 0, and remove it when CR0.wp is 1. With this >> patch, page faults is reduced to about 10,000 at average. > > Unfortunately, this isn''t safe for SMP guests -- vcpu0''s wp bit being > clear shouldn''t let vcpu1 ignore the _PAGE_RW bits on shared mappings. >Yes, this situation havn''t be handled. Could you give me some suggestion? How about out-of-sync shadow for CR0.wp = 0?> Sheers, > > Tim.Best Regards, Disheng, Su _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2008-Feb-01 10:21 UTC
Re: [Xen-devel] [PATCH 4/4] Enable VirtualPC 2007 run on top of XEN: add_write_for_data_pages
At 18:06 +0800 on 01 Feb (1201889179), Su, Disheng wrote:> Tim Deegan wrote: > > Unfortunately, this isn''t safe for SMP guests -- vcpu0''s wp bit being > > clear shouldn''t let vcpu1 ignore the _PAGE_RW bits on shared mappings. > > Yes, this situation havn''t be handled. Could you give me some > suggestion? > How about out-of-sync shadow for CR0.wp = 0?Yes, out-of-sync shadows will indeed help here, and we hope to have some out-of-sync patches in the next month or two. One down-side is that OOS tends to be an overall performance loss for multi-processor guests. Cheers, Tim. -- Tim Deegan <Tim.Deegan@citrix.com> Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel