Re: [PATCHv4 02/10] mm: convert mm->nr_ptes to atomic_t

2013-09-27 Thread Johannes Weiner
On Sat, Sep 28, 2013 at 01:24:51AM +0300, Kirill A. Shutemov wrote: > Cody P Schafer wrote: > > On 09/27/2013 06:16 AM, Kirill A. Shutemov wrote: > > > With split page table lock for PMD level we can't hold > > > mm->page_table_lock while updating nr_ptes. > > > > > > Let's convert it to atomic_t

Re: [PATCHv4 02/10] mm: convert mm->nr_ptes to atomic_t

2013-09-27 Thread Dave Hansen
On 09/27/2013 01:46 PM, Cody P Schafer wrote: > On 09/27/2013 06:16 AM, Kirill A. Shutemov wrote: >> @@ -339,6 +339,7 @@ struct mm_struct { >> pgd_t * pgd; >> atomic_t mm_users;/* How many users with user space? */ >> atomic_t mm_count;/* How many

Re: [PATCHv4 02/10] mm: convert mm->nr_ptes to atomic_t

2013-09-27 Thread Cody P Schafer
On 09/27/2013 06:16 AM, Kirill A. Shutemov wrote: With split page table lock for PMD level we can't hold mm->page_table_lock while updating nr_ptes. Let's convert it to atomic_t to avoid races. --- diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index

[PATCHv4 02/10] mm: convert mm->nr_ptes to atomic_t

2013-09-27 Thread Kirill A. Shutemov
With split page table lock for PMD level we can't hold mm->page_table_lock while updating nr_ptes. Let's convert it to atomic_t to avoid races. Signed-off-by: Kirill A. Shutemov Tested-by: Alex Thorlton --- fs/proc/task_mmu.c | 3 ++- include/linux/mm_types.h | 2 +- kernel/fork.c

[PATCHv4 02/10] mm: convert mm-nr_ptes to atomic_t

2013-09-27 Thread Kirill A. Shutemov
With split page table lock for PMD level we can't hold mm-page_table_lock while updating nr_ptes. Let's convert it to atomic_t to avoid races. Signed-off-by: Kirill A. Shutemov kirill.shute...@linux.intel.com Tested-by: Alex Thorlton athorl...@sgi.com --- fs/proc/task_mmu.c | 3 ++-

Re: [PATCHv4 02/10] mm: convert mm-nr_ptes to atomic_t

2013-09-27 Thread Cody P Schafer
On 09/27/2013 06:16 AM, Kirill A. Shutemov wrote: With split page table lock for PMD level we can't hold mm-page_table_lock while updating nr_ptes. Let's convert it to atomic_t to avoid races. --- diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index

Re: [PATCHv4 02/10] mm: convert mm-nr_ptes to atomic_t

2013-09-27 Thread Dave Hansen
On 09/27/2013 01:46 PM, Cody P Schafer wrote: On 09/27/2013 06:16 AM, Kirill A. Shutemov wrote: @@ -339,6 +339,7 @@ struct mm_struct { pgd_t * pgd; atomic_t mm_users;/* How many users with user space? */ atomic_t mm_count;/* How many references to

Re: [PATCHv4 02/10] mm: convert mm-nr_ptes to atomic_t

2013-09-27 Thread Johannes Weiner
On Sat, Sep 28, 2013 at 01:24:51AM +0300, Kirill A. Shutemov wrote: Cody P Schafer wrote: On 09/27/2013 06:16 AM, Kirill A. Shutemov wrote: With split page table lock for PMD level we can't hold mm-page_table_lock while updating nr_ptes. Let's convert it to atomic_t to avoid races.