Re: [PATCH] mm: thp: Set the accessed flag for old pages on access fault.

2012-10-16 Thread Ni zhan Chen
On 10/01/2012 10:59 PM, Andrea Arcangeli wrote: Hi Will, On Mon, Oct 01, 2012 at 02:51:45PM +0100, Will Deacon wrote: +void huge_pmd_set_accessed(struct mm_struct *mm, struct vm_area_struct *vma, + unsigned long address, pmd_t *pmd, pmd_t orig_pmd) +{ + pmd_t

Re: [PATCH] mm: thp: Set the accessed flag for old pages on access fault.

2012-10-16 Thread Ni zhan Chen
On 10/01/2012 10:59 PM, Andrea Arcangeli wrote: Hi Will, On Mon, Oct 01, 2012 at 02:51:45PM +0100, Will Deacon wrote: +void huge_pmd_set_accessed(struct mm_struct *mm, struct vm_area_struct *vma, + unsigned long address, pmd_t *pmd, pmd_t orig_pmd) +{ + pmd_t

Re: [PATCH] mm: thp: Set the accessed flag for old pages on access fault.

2012-10-01 Thread Will Deacon
On Mon, Oct 01, 2012 at 03:59:44PM +0100, Andrea Arcangeli wrote: > Hi Will, Hi Andrea, Kirill, Thanks for the comments. > On Mon, Oct 01, 2012 at 02:51:45PM +0100, Will Deacon wrote: > > +void huge_pmd_set_accessed(struct mm_struct *mm, struct vm_area_struct > > *vma, > > +

Re: [PATCH] mm: thp: Set the accessed flag for old pages on access fault.

2012-10-01 Thread Andrea Arcangeli
Hi Will, On Mon, Oct 01, 2012 at 02:51:45PM +0100, Will Deacon wrote: > +void huge_pmd_set_accessed(struct mm_struct *mm, struct vm_area_struct *vma, > +unsigned long address, pmd_t *pmd, pmd_t orig_pmd) > +{ > + pmd_t entry; > + > + spin_lock(>page_table_lock); >

Re: [PATCH] mm: thp: Set the accessed flag for old pages on access fault.

2012-10-01 Thread Kirill A. Shutemov
On Mon, Oct 01, 2012 at 02:51:45PM +0100, Will Deacon wrote: > diff --git a/mm/memory.c b/mm/memory.c > index 5736170..d5c007d 100644 > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -3537,7 +3537,11 @@ retry: > if (unlikely(ret & VM_FAULT_OOM)) >

[PATCH] mm: thp: Set the accessed flag for old pages on access fault.

2012-10-01 Thread Will Deacon
From: Steve Capper On x86 memory accesses to pages without the ACCESSED flag set result in the ACCESSED flag being set automatically. With the ARM architecture a page access fault is raised instead (and it will continue to be raised until the ACCESSED flag is set for the appropriate PTE/PMD).

[PATCH] mm: thp: Set the accessed flag for old pages on access fault.

2012-10-01 Thread Will Deacon
From: Steve Capper steve.cap...@arm.com On x86 memory accesses to pages without the ACCESSED flag set result in the ACCESSED flag being set automatically. With the ARM architecture a page access fault is raised instead (and it will continue to be raised until the ACCESSED flag is set for the

Re: [PATCH] mm: thp: Set the accessed flag for old pages on access fault.

2012-10-01 Thread Kirill A. Shutemov
On Mon, Oct 01, 2012 at 02:51:45PM +0100, Will Deacon wrote: diff --git a/mm/memory.c b/mm/memory.c index 5736170..d5c007d 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3537,7 +3537,11 @@ retry: if (unlikely(ret VM_FAULT_OOM))

Re: [PATCH] mm: thp: Set the accessed flag for old pages on access fault.

2012-10-01 Thread Andrea Arcangeli
Hi Will, On Mon, Oct 01, 2012 at 02:51:45PM +0100, Will Deacon wrote: +void huge_pmd_set_accessed(struct mm_struct *mm, struct vm_area_struct *vma, +unsigned long address, pmd_t *pmd, pmd_t orig_pmd) +{ + pmd_t entry; + + spin_lock(mm-page_table_lock); +

Re: [PATCH] mm: thp: Set the accessed flag for old pages on access fault.

2012-10-01 Thread Will Deacon
On Mon, Oct 01, 2012 at 03:59:44PM +0100, Andrea Arcangeli wrote: Hi Will, Hi Andrea, Kirill, Thanks for the comments. On Mon, Oct 01, 2012 at 02:51:45PM +0100, Will Deacon wrote: +void huge_pmd_set_accessed(struct mm_struct *mm, struct vm_area_struct *vma, +