Re: [PATCHv9 25/36] mm, thp: remove infrastructure for handling splitting PMDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.shutemov@xxxxxxxxxxxxxxx>
> Tested-by: Sasha Levin <sasha.levin@xxxxxxxxxx>
> Tested-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
> Acked-by: Vlastimil Babka <vbabka@xxxxxxx>
> ---
>  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 <jmarchan@xxxxxxxxxx>

> -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


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]