lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55BB8DB2.9010804@redhat.com>
Date:	Fri, 31 Jul 2015 17:01:06 +0200
From:	Jerome Marchand <jmarchan@...hat.com>
To:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Hugh Dickins <hughd@...gle.com>
CC:	Dave Hansen <dave.hansen@...el.com>, Mel Gorman <mgorman@...e.de>,
	Rik van Riel <riel@...hat.com>,
	Vlastimil Babka <vbabka@...e.cz>,
	Christoph Lameter <cl@...two.org>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	Steve Capper <steve.capper@...aro.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Michal Hocko <mhocko@...e.cz>,
	Sasha Levin <sasha.levin@...cle.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCHv9 25/36] mm, thp: remove infrastructure for handling splitting
 PMDs

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@...ux.intel.com>
> Tested-by: Sasha Levin <sasha.levin@...cle.com>
> Tested-by: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
> Acked-by: Vlastimil Babka <vbabka@...e.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 <jmarchan@...hat.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;
>  }
>  
>  /*



Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ