Re: [kvm-devel] [PATCH] mmu notifiers #v2

2008-01-17 Thread Andrea Arcangeli
On Wed, Jan 16, 2008 at 07:48:06PM +0200, Izik Eidus wrote: Rik van Riel wrote: On Sun, 13 Jan 2008 17:24:18 +0100 Andrea Arcangeli [EMAIL PROTECTED] wrote: In my basic initial patch I only track the tlb flushes which should be the minimum required to have a nice linux-VM controlled

Re: [kvm-devel] [PATCH] mmu notifiers #v2

2008-01-17 Thread Izik Eidus
Andrea Arcangeli wrote: On Wed, Jan 16, 2008 at 07:48:06PM +0200, Izik Eidus wrote: Rik van Riel wrote: On Sun, 13 Jan 2008 17:24:18 +0100 Andrea Arcangeli [EMAIL PROTECTED] wrote: In my basic initial patch I only track the tlb flushes which should be the minimum

Re: [kvm-devel] [PATCH] mmu notifiers #v2

2008-01-17 Thread Andrea Arcangeli
On Thu, Jan 17, 2008 at 08:21:16PM +0200, Izik Eidus wrote: ohh i like it, this is cleaver solution, and i guess the cost of the vmexits wont be too high if it will be not too much aggressive Yes, and especially during swapping, the system isn't usually CPU bound. The idea is to pay with

Re: [kvm-devel] [PATCH] mmu notifiers #v2

2008-01-16 Thread Rik van Riel
On Sun, 13 Jan 2008 17:24:18 +0100 Andrea Arcangeli [EMAIL PROTECTED] wrote: In my basic initial patch I only track the tlb flushes which should be the minimum required to have a nice linux-VM controlled swapping behavior of the KVM gphysical memory. I have a vaguely related question on KVM

Re: [kvm-devel] [PATCH] mmu notifiers #v2

2008-01-16 Thread Izik Eidus
Rik van Riel wrote: On Sun, 13 Jan 2008 17:24:18 +0100 Andrea Arcangeli [EMAIL PROTECTED] wrote: In my basic initial patch I only track the tlb flushes which should be the minimum required to have a nice linux-VM controlled swapping behavior of the KVM gphysical memory. I have a

Re: [kvm-devel] [PATCH] mmu notifiers #v2

2008-01-14 Thread Benjamin Herrenschmidt
On Mon, 2008-01-14 at 12:02 -0800, Christoph Lameter wrote: On Sun, 13 Jan 2008, Andrea Arcangeli wrote: About the locking perhaps I'm underestimating it, but by following the TLB flushing analogy, by simply clearing the shadow ptes (with kvm mmu_lock spinlock to avoid racing with other

[kvm-devel] [PATCH] mmu notifiers #v2

2008-01-13 Thread Andrea Arcangeli
Hello, This patch is last version of a basic implementation of the mmu notifiers. In short when the linux VM decides to free a page, it will unmap it from the linux pagetables. However when a page is mapped not just by the regular linux ptes, but also from the shadow pagetables, it's currently

Re: [kvm-devel] [PATCH] mmu notifiers #v2

2008-01-13 Thread Benjamin Herrenschmidt
On Sun, 2008-01-13 at 17:24 +0100, Andrea Arcangeli wrote: Hello, This patch is last version of a basic implementation of the mmu notifiers. In short when the linux VM decides to free a page, it will unmap it from the linux pagetables. However when a page is mapped not just by the