On 07/20/2015 04:20 PM, Kirill A. Shutemov wrote:
> With new refcounting we don't need to mark PMDs splitting. Let's drop code
> to handle this.
> 
> Signed-off-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com>
> Tested-by: Sasha Levin <sasha.le...@oracle.com>
> Tested-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com>
> Acked-by: Vlastimil Babka <vba...@suse.cz>
> ---
>  fs/proc/task_mmu.c            |  8 +++---
>  include/asm-generic/pgtable.h |  9 -------
>  include/linux/huge_mm.h       | 21 +++++----------
>  mm/gup.c                      | 12 +--------
>  mm/huge_memory.c              | 60 
> ++++++++++---------------------------------
>  mm/memcontrol.c               | 13 ++--------
>  mm/memory.c                   | 18 ++-----------
>  mm/mincore.c                  |  2 +-
>  mm/mremap.c                   | 15 +++++------
>  mm/pgtable-generic.c          | 14 ----------
>  mm/rmap.c                     |  4 +--
>  11 files changed, 37 insertions(+), 139 deletions(-)
> 

snip

> @@ -1616,23 +1605,14 @@ int change_huge_pmd(struct vm_area_struct *vma, pmd_t 
> *pmd,
>   * Note that if it returns 1, this routine returns without unlocking page
>   * table locks. So callers must unlock them.
>   */

The comment above should be updated. It otherwise looks good.

Acked-by: Jerome Marchand <jmarc...@redhat.com>

> -int __pmd_trans_huge_lock(pmd_t *pmd, struct vm_area_struct *vma,
> +bool __pmd_trans_huge_lock(pmd_t *pmd, struct vm_area_struct *vma,
>               spinlock_t **ptl)
>  {
>       *ptl = pmd_lock(vma->vm_mm, pmd);
> -     if (likely(pmd_trans_huge(*pmd))) {
> -             if (unlikely(pmd_trans_splitting(*pmd))) {
> -                     spin_unlock(*ptl);
> -                     wait_split_huge_page(vma->anon_vma, pmd);
> -                     return -1;
> -             } else {
> -                     /* Thp mapped by 'pmd' is stable, so we can
> -                      * handle it as it is. */
> -                     return 1;
> -             }
> -     }
> +     if (likely(pmd_trans_huge(*pmd)))
> +             return true;
>       spin_unlock(*ptl);
> -     return 0;
> +     return false;
>  }
>  
>  /*


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to