Re: Dirty page tracking in EPT

2011-10-02 Thread Nai Xia
Hi, On Sunday 02 October 2011 17:43:23 Prateek Sharma wrote: Hello , I came across the dirty-page tracking patch here: [https://lkml.org/lkml/2011/6/21/169] . There is some mention of dirty-bit tracking not working with EPT. Can someone please clarify this? Does this patch only work

[PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-21 Thread Nai Xia
if intel EPT is enabled to indicate that the dirty bits of underlying sptes are not updated by hardware. Signed-off-by: Nai Xia nai@gmail.com Acked-by: Izik Eidus izik.ei...@ravellosystems.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/mmu.c | 36

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-21 Thread Nai Xia
On Wednesday 22 June 2011 08:21:23 Chris Wright wrote: * Nai Xia (nai@gmail.com) wrote: Introduced kvm_mmu_notifier_test_and_clear_dirty(), kvm_mmu_notifier_dirty_update() and their mmu_notifier interfaces to support KSM dirty bit tracking, which brings significant performance

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Wednesday 22 June 2011 14:15:51 Izik Eidus wrote: On 6/22/2011 3:21 AM, Chris Wright wrote: * Nai Xia (nai@gmail.com) wrote: Introduced kvm_mmu_notifier_test_and_clear_dirty(), kvm_mmu_notifier_dirty_update() and their mmu_notifier interfaces to support KSM dirty bit tracking

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Wednesday 22 June 2011 19:28:08 Avi Kivity wrote: On 06/22/2011 02:24 PM, Avi Kivity wrote: On 06/22/2011 02:19 PM, Izik Eidus wrote: On 6/22/2011 2:10 PM, Avi Kivity wrote: On 06/22/2011 02:05 PM, Izik Eidus wrote: +spte = rmap_next(kvm, rmapp, NULL); +while (spte) { +

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Wed, Jun 22, 2011 at 11:39 PM, Rik van Riel r...@redhat.com wrote: On 06/22/2011 07:19 AM, Izik Eidus wrote: So what we say here is: it is better to have little junk in the unstable tree that get flushed eventualy anyway, instead of make the guest slower this race is something that

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Wed, Jun 22, 2011 at 11:03 PM, Andrea Arcangeli aarca...@redhat.com wrote: On Tue, Jun 21, 2011 at 09:32:39PM +0800, Nai Xia wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d48ec60..b407a69 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -4674,6 +4674,7

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Thu, Jun 23, 2011 at 12:55 AM, Andrea Arcangeli aarca...@redhat.com wrote: On Wed, Jun 22, 2011 at 11:39:40AM -0400, Rik van Riel wrote: On 06/22/2011 07:19 AM, Izik Eidus wrote: So what we say here is: it is better to have little junk in the unstable tree that get flushed eventualy

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Wed, Jun 22, 2011 at 11:03 PM, Andrea Arcangeli aarca...@redhat.com wrote: On Tue, Jun 21, 2011 at 09:32:39PM +0800, Nai Xia wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d48ec60..b407a69 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -4674,6 +4674,7

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Thu, Jun 23, 2011 at 7:44 AM, Andrea Arcangeli aarca...@redhat.com wrote: On Thu, Jun 23, 2011 at 07:19:06AM +0800, Nai Xia wrote: OK, I'll have a try over other workarounds. I am not feeling good about need_pte_unmap myself. :-) The usual way is to check VM_HUGETLB in the caller

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Thu, Jun 23, 2011 at 7:59 AM, Andrea Arcangeli aarca...@redhat.com wrote: On Thu, Jun 23, 2011 at 07:37:47AM +0800, Nai Xia wrote: On 2MB pages, I'd like to remind you and Rik that ksmd currently splits huge pages before their sub pages gets really merged to stable tree. So when

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Thu, Jun 23, 2011 at 8:00 AM, Rik van Riel r...@redhat.com wrote: On 06/22/2011 07:37 PM, Nai Xia wrote: On 2MB pages, I'd like to remind you and Rik that ksmd currently splits huge pages before their sub pages gets really merged to stable tree. Your proposal appears to add a condition

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Thu, Jun 23, 2011 at 7:28 AM, Rik van Riel r...@redhat.com wrote: On 06/22/2011 07:13 PM, Nai Xia wrote: On Wed, Jun 22, 2011 at 11:39 PM, Rik van Rielr...@redhat.com  wrote: On 06/22/2011 07:19 AM, Izik Eidus wrote: So what we say here is: it is better to have little junk

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Thu, Jun 23, 2011 at 7:25 AM, Andrea Arcangeli aarca...@redhat.com wrote: On Thu, Jun 23, 2011 at 07:13:54AM +0800, Nai Xia wrote: I agree on this point. Dirty bit , young bit, is by no means accurate. Even on 4kB pages, there is always a chance that the pte are dirty but the contents

Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking

2011-06-22 Thread Nai Xia
On Thu, Jun 23, 2011 at 8:44 AM, Andrea Arcangeli aarca...@redhat.com wrote: On Thu, Jun 23, 2011 at 08:31:56AM +0800, Nai Xia wrote: On Thu, Jun 23, 2011 at 7:59 AM, Andrea Arcangeli aarca...@redhat.com wrote: On Thu, Jun 23, 2011 at 07:37:47AM +0800, Nai Xia wrote: On 2MB pages, I'd like