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]
Date:	Wed, 29 Apr 2015 14:43:45 +0530
From:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.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>,
	Johannes Weiner <hannes@...xchg.org>,
	Michal Hocko <mhocko@...e.cz>,
	Jerome Marchand <jmarchan@...hat.com>,
	Sasha Levin <sasha.levin@...cle.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCHv5 18/28] x86, thp: remove infrastructure for handling splitting PMDs

"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com> writes:

> 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>
> ---
>  arch/x86/include/asm/pgtable.h       |  9 ---------
>  arch/x86/include/asm/pgtable_types.h |  2 --
>  arch/x86/mm/gup.c                    | 13 +------------
>  arch/x86/mm/pgtable.c                | 14 --------------
>  4 files changed, 1 insertion(+), 37 deletions(-)
>
> diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
> index f89d6c9943ea..21a2e25a5393 100644
> --- a/arch/x86/include/asm/pgtable.h
> +++ b/arch/x86/include/asm/pgtable.h
> @@ -158,11 +158,6 @@ static inline int pmd_large(pmd_t pte)
>  }
>  
>  #ifdef CONFIG_TRANSPARENT_HUGEPAGE
> -static inline int pmd_trans_splitting(pmd_t pmd)
> -{
> -	return pmd_val(pmd) & _PAGE_SPLITTING;
> -}
> -
>  static inline int pmd_trans_huge(pmd_t pmd)
>  {
>  	return pmd_val(pmd) & _PAGE_PSE;
> @@ -792,10 +787,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma,
>  				  unsigned long address, pmd_t *pmdp);
>  
>  
> -#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH
> -extern void pmdp_splitting_flush(struct vm_area_struct *vma,
> -				 unsigned long addr, pmd_t *pmdp);
> -

Can we keep pmdp_splitting_flush or a variant and use that before a
hugepage split ? That is to have a special function to do
pmd_clear before splitting ?. We still depend on a IPI to be send to
other cpus on split and not all archs will do that in
pmdp_clear_flush_notify. I guess we need the ipi to make sure a
local_irq_disable can prevent a parallel split ?

Something like ?

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index cce4604c192f..0a0d00b21f76 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2608,7 +2608,7 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd,
 	young = pmd_young(*pmd);
 
 	/* leave pmd empty until pte is filled */
-	pmdp_clear_flush_notify(vma, haddr, pmd);
+	pmdp_splitting_clear_flush_notify(vma, haddr, pmd);
 
 	pgtable = pgtable_trans_huge_withdraw(mm, pmd);
 	pmd_populate(mm, &_pmd, pgtable);


-aneesh

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ