Re: [kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks

2008-02-19 Thread Andrea Arcangeli
On Tue, Feb 19, 2008 at 07:46:10PM +1100, Nick Piggin wrote: On Sunday 17 February 2008 06:22, Christoph Lameter wrote: On Fri, 15 Feb 2008, Andrew Morton wrote: flush_cache_page(vma, address, pte_pfn(*pte)); entry = ptep_clear_flush(vma, address, pte);

Re: [kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks

2008-02-17 Thread Nick Piggin
On Saturday 16 February 2008 14:37, Andrew Morton wrote: On Thu, 14 Feb 2008 22:49:02 -0800 Christoph Lameter [EMAIL PROTECTED] wrote: Two callbacks to remove individual pages as done in rmap code invalidate_page() Called from the inner loop of rmap walks to invalidate pages.

Re: [kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks

2008-02-16 Thread Andrea Arcangeli
On Fri, Feb 15, 2008 at 07:37:36PM -0800, Andrew Morton wrote: The | is obviously deliberate. But no explanation is provided telling us why we still call the callback if ptep_clear_flush_young() said the page was recently referenced. People who read your code will want to understand this.

Re: [kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks

2008-02-16 Thread Christoph Lameter
On Fri, 15 Feb 2008, Andrew Morton wrote: @@ -287,7 +288,8 @@ static int page_referenced_one(struct pa if (vma-vm_flags VM_LOCKED) { referenced++; *mapcount = 1; /* break early from loop */ - } else if (ptep_clear_flush_young(vma, address, pte)) + }

Re: [kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks

2008-02-15 Thread Andrew Morton
On Thu, 14 Feb 2008 22:49:02 -0800 Christoph Lameter [EMAIL PROTECTED] wrote: Two callbacks to remove individual pages as done in rmap code invalidate_page() Called from the inner loop of rmap walks to invalidate pages. age_page() Called for the determination of the page

[kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks

2008-02-14 Thread Christoph Lameter
Two callbacks to remove individual pages as done in rmap code invalidate_page() Called from the inner loop of rmap walks to invalidate pages. age_page() Called for the determination of the page referenced status. If we do not care about page referenced status then an age_page

[kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks

2008-02-08 Thread Christoph Lameter
Two callbacks to remove individual pages as done in rmap code invalidate_page() Called from the inner loop of rmap walks to invalidate pages. age_page() Called for the determination of the page referenced status. If we do not care about page referenced status then an age_page

Re: [kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks for subsystems with rmap

2008-01-30 Thread Robin Holt
This is the second part of a patch posted to patch 1/6. Index: git-linus/mm/rmap.c === --- git-linus.orig/mm/rmap.c2008-01-30 11:55:56.0 -0600 +++ git-linus/mm/rmap.c 2008-01-30 12:01:28.0 -0600 @@ -476,8 +476,10

Re: [kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks for subsystems with rmap

2008-01-29 Thread Robin Holt
I don't understand how this is intended to work. I think the page flag needs to be maintained by the mmu_notifier subsystem. Let's assume we have a mapping that has a grant from xpmem and an additional grant from kvm. The exporters are not important, the fact that there may be two is. Assume

[kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks for subsystems with rmap

2008-01-29 Thread Christoph Lameter
Callbacks to remove individual pages if the subsystem has an rmap capability. The pagelock is held but no spinlocks are held. The refcount of the page is elevated so that dropping the refcount in the subsystem will not directly free the page. The callbacks occur after the Linux rmaps have been

[kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks for subsystems with rmap

2008-01-28 Thread Christoph Lameter
Callbacks to remove individual pages if the subsystem has an rmap capability. The pagelock is held but no spinlocks are held. The refcount of the page is elevated so that dropping the refcount in the subsystem will not directly free the page. The callbacks occur after the Linux rmaps have been