Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934078AbcDFJ42 (ORCPT ); Wed, 6 Apr 2016 05:56:28 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34703 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933798AbcDFJ41 (ORCPT ); Wed, 6 Apr 2016 05:56:27 -0400 Date: Wed, 6 Apr 2016 11:56:24 +0200 From: Michal Hocko To: Sukadev Bhattiprolu Cc: Michael Ellerman , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, James Dykman , "Aneesh Kumar K.V" Subject: Re: [PATCH 1/1] powerpc/mm: Add memory barrier in __hugepte_alloc() Message-ID: <20160406095623.GA24283@dhcp22.suse.cz> References: <20160405190547.GA12673@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160405190547.GA12673@us.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 741 Lines: 29 On Tue 05-04-16 12:05:47, Sukadev Bhattiprolu wrote: [...] > diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c > index d991b9e..081f679 100644 > --- a/arch/powerpc/mm/hugetlbpage.c > +++ b/arch/powerpc/mm/hugetlbpage.c > @@ -81,6 +81,13 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, > if (! new) > return -ENOMEM; > > + /* > + * Make sure other cpus find the hugepd set only after a > + * properly initialized page table is visible to them. > + * For more details look for comment in __pte_alloc(). > + */ > + smp_wmb(); > + what is the pairing memory barrier? > spin_lock(&mm->page_table_lock); > #ifdef CONFIG_PPC_FSL_BOOK3E > /* > -- > 1.8.3.1 -- Michal Hocko SUSE Labs