From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 17 May 2017 12:23:09 -0600 From: Ross Zwisler To: Dave Hansen Cc: Ross Zwisler , Andrew Morton , linux-kernel@vger.kernel.org, "Darrick J. Wong" , Alexander Viro , Christoph Hellwig , Dan Williams , Jan Kara , Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, "Kirill A . Shutemov" , Pawel Lebioda , Dave Jiang , Xiong Zhou , Eryu Guan , stable@vger.kernel.org Subject: Re: [PATCH 1/2] mm: avoid spurious 'bad pmd' warning messages Message-ID: <20170517182309.GA30704@linux.intel.com> References: <20170517171639.14501-1-ross.zwisler@linux.intel.com> <9c45c769-2f5e-9327-c39e-1df7744fa633@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c45c769-2f5e-9327-c39e-1df7744fa633@intel.com> Sender: owner-linux-mm@kvack.org List-ID: On Wed, May 17, 2017 at 10:33:58AM -0700, Dave Hansen wrote: > On 05/17/2017 10:16 AM, Ross Zwisler wrote: > > @@ -3061,7 +3061,7 @@ static int pte_alloc_one_map(struct vm_fault *vmf) > > * through an atomic read in C, which is what pmd_trans_unstable() > > * provides. > > */ > > - if (pmd_trans_unstable(vmf->pmd) || pmd_devmap(*vmf->pmd)) > > + if (pmd_devmap(*vmf->pmd) || pmd_trans_unstable(vmf->pmd)) > > return VM_FAULT_NOPAGE; > > I'm worried we are very unlikely to get this right in the future. It's > totally not obvious what the ordering requirement is here. > > Could we move pmd_devmap() and pmd_trans_unstable() into a helper that > gets the ordering right and also spells out the ordering requirement? Sure, I'll fix this for v2. Thanks for the review. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org