All of lore.kernel.org
 help / color / mirror / Atom feed
* [v2 00/11] PML (Paging Modification Logging) support
@ 2015-04-15  7:03 Kai Huang
  2015-04-15  7:03 ` [v2 01/11] vmx: add new boot parameter to control PML enabling Kai Huang
                   ` (11 more replies)
  0 siblings, 12 replies; 62+ messages in thread
From: Kai Huang @ 2015-04-15  7:03 UTC (permalink / raw)
  To: andrew.cooper3, tim, jbeulich, kevin.tian, xen-devel; +Cc: Kai Huang

This v2 patch series was rebased on latest upstream code.

v1->v2:

Firstly the sequence of this patch series were adjusted addressing Andrew and
Tim's comments:

    - Put v1 patch 2 (new boot parameter for PML) to be patch 1.
    - Added a new patch to patch the doc change of new added boot parameter
      of controlling PML enabling, as patch 2.
    - Added a new patch to introduce paging_mark_gfn_dirty, and made
      paging_mark_dirty as a wrapper of it, as patch 3.
    - Merged v1 patch 1 (EPT A/D bits support) and v1 patch 10 (enabling PML in
      p2m-ept.c) to a single patch as they both operates on EPT A/D bits, with
      considering EPT A/D bits will be enabled only when PML is used as well.
      To me, looks a single patch is more straightforward.

The v2 patch series were orginized as following, with detail changes described
under each of them.

patch 1: Add new boot parameter to control PML enabling
    - adjusted the sequence of parsing function and boot parameter.

patch 2: new patch for adding description for new PML boot parameter
    - inspired by "iommu=" parameter.

patch 3: add new paging_mark_gfn_dirty
    - Introduced new paging_mark_gfn_dirty, which takes guest pfn as parameter,
      and made paging_mark_dirty a wrapper of paging_mark_gfn_dirty, commented
      by Tim.

patch 4: PML feature detection
    - disable opt_pml_enabled if PML is not present, commented by Andrew.

patch 5 ~ 9: Add PML support in VMX
    - changed vmx_*_{enable|disable}_pml, vmx_domain_flush_pml_buffer to be
      idempotent, commented by Tim. vmx_vcpu_flush_pml_buffer remains the same
      as it is also called in PML buffer full VMEXIT.
    - changed vmx_{vcpu|domain}_pml_enabled to return bool_t, with taking const
      pointer (of vcpu or domain) as parameter, commented by Andrew.
    - changed vmx_vcpu_flush_pml_buffer calling paging_mark_gfn_dirty instead of
      paging_mark_dirty, commented by Tim.
    - changed various coding style issues and did several code refinements
      commented by Andrew.

patch 10: refine log-dirty common code to support PML
    - removed PML buffer flush callback in log_dirty_domain in paging layer.
    - changed to call p2m_flush_hardware_cached_dirty directly in
      hap_track_dirty_vram, and paging_log_dirty_op.

patch 11: enable EPT A/D bits and add PML support in p2m-ept.c
    - Merged EPT A/D bits support with enabling PML in p2m-ept.c as it's more
      straightforward, with considering EPT A/D bits will only be enabled if PML
      is used, and both of them operates on EPT A/D bits.
    - Manually set or clear A/D bits in ept_p2m_type_to_flags, and
      ept_set_middle_entry, commented by Tim.

Several sanity tests of live migration were done, and all tests worked well.

I also tested specjbb performance under global log-dirty, by using the same hack
mentioned in v1. The result is consistent with v1 (~10% improvement in global
log-dirty), and PML is beneficial in reducing hypervisor overhead in log-dirty
mode.

- global log-dirty:

    WP              PML (v1)        PML (v2)
    72862           79511	        80007
    73466           81173	        81614
    72989           81177	        82047
    73138           81777	        81975
    72811           80257	        80139
    72486           80413	        81127

avg 72959           80718	        81151
    100%            110.63%         111.22%



Kai Huang (11):
  vmx: add new boot parameter to control PML enabling
  doc: add description for new PML boot parameter
  log-dirty: add new paging_mark_gfn_dirty
  vmx: add PML definition and feature detection.
  vmx: add new data structure member to support PML
  vmx: add help functions to support PML
  vmx: handle PML buffer full VMEXIT
  vmx: handle PML enabling in vmx_vcpu_initialise
  vmx: disable PML in vmx_vcpu_destroy
  log-dirty: refine common code to support PML
  p2m/ept: enable PML in p2m-ept for log-dirty

 docs/misc/xen-command-line.markdown |  14 +++
 xen/arch/x86/hvm/vmx/vmcs.c         | 231 ++++++++++++++++++++++++++++++++++++
 xen/arch/x86/hvm/vmx/vmx.c          |  35 ++++++
 xen/arch/x86/mm/hap/hap.c           |  29 ++++-
 xen/arch/x86/mm/p2m-ept.c           |  79 ++++++++++--
 xen/arch/x86/mm/p2m.c               |  36 ++++++
 xen/arch/x86/mm/paging.c            |  41 +++++--
 xen/include/asm-x86/hvm/vmx/vmcs.h  |  25 +++-
 xen/include/asm-x86/hvm/vmx/vmx.h   |   4 +-
 xen/include/asm-x86/p2m.h           |  11 ++
 xen/include/asm-x86/paging.h        |   2 +
 11 files changed, 484 insertions(+), 23 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 62+ messages in thread

end of thread, other threads:[~2015-04-24  7:41 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-15  7:03 [v2 00/11] PML (Paging Modification Logging) support Kai Huang
2015-04-15  7:03 ` [v2 01/11] vmx: add new boot parameter to control PML enabling Kai Huang
2015-04-15 10:12   ` Andrew Cooper
2015-04-15 12:20   ` Jan Beulich
2015-04-15 13:20     ` Kai Huang
2015-04-15 13:47       ` Jan Beulich
2015-04-15  7:03 ` [v2 02/11] doc: add description for new PML boot parameter Kai Huang
2015-04-15 10:15   ` Andrew Cooper
2015-04-15 12:17     ` Jan Beulich
2015-04-16  4:47     ` Kai Huang
2015-04-16 14:49       ` Andrew Cooper
2015-04-15  7:03 ` [v2 03/11] log-dirty: add new paging_mark_gfn_dirty Kai Huang
2015-04-15  7:03 ` [v2 04/11] vmx: add PML definition and feature detection Kai Huang
2015-04-16 22:35   ` Tian, Kevin
2015-04-17  2:14     ` Kai Huang
2015-04-15  7:03 ` [v2 05/11] vmx: add new data structure member to support PML Kai Huang
2015-04-16 15:33   ` Jan Beulich
2015-04-17  2:12     ` Kai Huang
2015-04-16 22:39   ` Tian, Kevin
2015-04-17  2:31     ` Kai Huang
2015-04-21  6:04       ` Kai Huang
2015-04-21 13:10         ` Tian, Kevin
2015-04-15  7:03 ` [v2 06/11] vmx: add help functions " Kai Huang
2015-04-16 15:42   ` Jan Beulich
2015-04-17  3:10     ` Kai Huang
2015-04-17  6:23       ` Jan Beulich
2015-04-17  6:51         ` Kai Huang
2015-04-17  6:58           ` Jan Beulich
2015-04-17  7:23             ` Kai Huang
2015-04-17  7:37               ` Jan Beulich
2015-04-17  7:45                 ` Kai Huang
2015-04-24  6:32                 ` Kai Huang
2015-04-24  7:30                   ` Jan Beulich
2015-04-24  7:41                     ` Kai Huang
2015-04-16 22:57   ` Tian, Kevin
2015-04-17  0:10     ` Tim Deegan
2015-04-17  3:32       ` Kai Huang
2015-04-17  8:36         ` Tim Deegan
2015-04-17  9:29           ` Kai Huang
2015-04-20  8:29             ` Tim Deegan
2015-04-20 10:08               ` Kai Huang
2015-04-20 10:13                 ` Tim Deegan
2015-04-17  3:15     ` Kai Huang
2015-04-16 22:59   ` Tian, Kevin
2015-04-15  7:03 ` [v2 07/11] vmx: handle PML buffer full VMEXIT Kai Huang
2015-04-15  7:03 ` [v2 08/11] vmx: handle PML enabling in vmx_vcpu_initialise Kai Huang
2015-04-15  7:03 ` [v2 09/11] vmx: disable PML in vmx_vcpu_destroy Kai Huang
2015-04-15  7:03 ` [v2 10/11] log-dirty: refine common code to support PML Kai Huang
2015-04-16 15:51   ` Jan Beulich
2015-04-16 23:07     ` Tian, Kevin
2015-04-17  2:47       ` Kai Huang
2015-04-17  2:46     ` Kai Huang
2015-04-17  6:28       ` Jan Beulich
2015-04-17  6:55         ` Kai Huang
2015-04-15  7:03 ` [v2 11/11] p2m/ept: enable PML in p2m-ept for log-dirty Kai Huang
2015-04-16 15:54   ` Jan Beulich
2015-04-17  2:40     ` Kai Huang
2015-04-17  6:28       ` Jan Beulich
2015-04-17  7:10         ` Kai Huang
2015-04-17  7:33           ` Jan Beulich
2015-04-16 14:41 ` [v2 00/11] PML (Paging Modification Logging) support Tim Deegan
2015-04-16 15:18   ` Kai Huang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.