Re: [patch -mm 1/2] i386: add ptep_test_and_clear_{dirty,young}

2007-03-26 Thread Zachary Amsden
David Rientjes wrote: On Sun, 25 Mar 2007, Zachary Amsden wrote: If you actually clear the bit, you need to: + pte_update_defer(vma->vm_mm, addr, ptep); The reason is, when updating PTEs, the hypervisor must be notified. Using atomic operations to do this is fine for all hyperviso

Re: [patch -mm 1/2] i386: add ptep_test_and_clear_{dirty,young}

2007-03-26 Thread Zachary Amsden
Hugh Dickins wrote: On Sun, 25 Mar 2007, Zachary Amsden wrote: If you actually clear the bit, you need to: + pte_update_defer(vma->vm_mm, addr, ptep); The reason is, when updating PTEs, the hypervisor must be notified. Using atomic operations to do this is fine for all hypervisors

Re: [patch -mm 1/2] i386: add ptep_test_and_clear_{dirty,young}

2007-03-25 Thread David Rientjes
On Sun, 25 Mar 2007, Zachary Amsden wrote: > If you actually clear the bit, you need to: > > + pte_update_defer(vma->vm_mm, addr, ptep); > > The reason is, when updating PTEs, the hypervisor must be notified. Using > atomic operations to do this is fine for all hypervisors I am aware of

Re: [patch -mm 1/2] i386: add ptep_test_and_clear_{dirty,young}

2007-03-25 Thread Hugh Dickins
On Sun, 25 Mar 2007, Zachary Amsden wrote: > > If you actually clear the bit, you need to: > > + pte_update_defer(vma->vm_mm, addr, ptep); > > The reason is, when updating PTEs, the hypervisor must be notified. Using > atomic operations to do this is fine for all hypervisors I am aware

Re: [patch -mm 1/2] i386: add ptep_test_and_clear_{dirty,young}

2007-03-25 Thread Zachary Amsden
Hugh Dickins wrote: On Sun, 25 Mar 2007, David Rientjes wrote: Add ptep_test_and_clear_{dirty,young} to i386. They advertise that they have it and there is at least one place where it needs to be called without the page table lock: to clear the accessed bit on write to Without the pag

Re: [patch -mm 1/2] i386: add ptep_test_and_clear_{dirty,young}

2007-03-25 Thread Hugh Dickins
On Sun, 25 Mar 2007, David Rientjes wrote: > Add ptep_test_and_clear_{dirty,young} to i386. They advertise that they > have it and there is at least one place where it needs to be called > without the page table lock: to clear the accessed bit on write to Without the page table lock?? > /proc/pi

[patch -mm 1/2] i386: add ptep_test_and_clear_{dirty,young}

2007-03-25 Thread David Rientjes
Add ptep_test_and_clear_{dirty,young} to i386. They advertise that they have it and there is at least one place where it needs to be called without the page table lock: to clear the accessed bit on write to /proc/pid/clear_refs. ptep_clear_flush_{dirty,young} are updated to use the new functions.