mbox series

[v3,0/2] KVM: x86: Enable dirty logging lazily for huge pages

Message ID 20210429034115.35560-1-zhukeqian1@huawei.com (mailing list archive)
Headers show
Series KVM: x86: Enable dirty logging lazily for huge pages | expand

Message

zhukeqian April 29, 2021, 3:41 a.m. UTC
Hi,

Currently during start dirty logging, if we're with init-all-set,
we write protect huge pages and leave normal pages untouched, for
that we can enable dirty logging for these pages lazily.

Actually enable dirty logging lazily for huge pages is feasible
too, which not only reduces the time of start dirty logging, also
greatly reduces side-effect on guest when there is high dirty rate.

Thanks,
Keqian

Changelog:

v3:
 - Discussed with Ben and delete RFC comments. Thanks.

Keqian Zhu (2):
  KVM: x86: Support write protect gfn with min_level
  KVM: x86: Not wr-protect huge page with init_all_set dirty log

 arch/x86/kvm/mmu/mmu.c          | 38 ++++++++++++++++++++++++++-------
 arch/x86/kvm/mmu/mmu_internal.h |  3 ++-
 arch/x86/kvm/mmu/page_track.c   |  2 +-
 arch/x86/kvm/mmu/tdp_mmu.c      | 16 ++++++++++----
 arch/x86/kvm/mmu/tdp_mmu.h      |  3 ++-
 arch/x86/kvm/x86.c              | 37 +++++++++-----------------------
 6 files changed, 57 insertions(+), 42 deletions(-)

Comments

zhukeqian May 11, 2021, 6:49 a.m. UTC | #1
ping. ^_^

On 2021/4/29 11:41, Keqian Zhu wrote:
> Hi,
> 
> Currently during start dirty logging, if we're with init-all-set,
> we write protect huge pages and leave normal pages untouched, for
> that we can enable dirty logging for these pages lazily.
> 
> Actually enable dirty logging lazily for huge pages is feasible
> too, which not only reduces the time of start dirty logging, also
> greatly reduces side-effect on guest when there is high dirty rate.
> 
> Thanks,
> Keqian
> 
> Changelog:
> 
> v3:
>  - Discussed with Ben and delete RFC comments. Thanks.
> 
> Keqian Zhu (2):
>   KVM: x86: Support write protect gfn with min_level
>   KVM: x86: Not wr-protect huge page with init_all_set dirty log
> 
>  arch/x86/kvm/mmu/mmu.c          | 38 ++++++++++++++++++++++++++-------
>  arch/x86/kvm/mmu/mmu_internal.h |  3 ++-
>  arch/x86/kvm/mmu/page_track.c   |  2 +-
>  arch/x86/kvm/mmu/tdp_mmu.c      | 16 ++++++++++----
>  arch/x86/kvm/mmu/tdp_mmu.h      |  3 ++-
>  arch/x86/kvm/x86.c              | 37 +++++++++-----------------------
>  6 files changed, 57 insertions(+), 42 deletions(-)
>