Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751590AbcDTXsO (ORCPT ); Wed, 20 Apr 2016 19:48:14 -0400 Received: from ozlabs.org ([103.22.144.67]:54896 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751228AbcDTXsN (ORCPT ); Wed, 20 Apr 2016 19:48:13 -0400 Date: Thu, 21 Apr 2016 09:48:11 +1000 From: Stephen Rothwell To: Hugh Dickins Cc: Andrew Morton , "Kirill A. Shutemov" , Andrea Arcangeli , Andres Lagar-Cavilla , Yang Shi , Ning Qu , kbuild test robot , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH mmotm 2/5] huge tmpfs: fix mlocked meminfo track huge unhuge mlocks fix Message-ID: <20160421094811.6552f22b@canb.auug.org.au> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1173 Lines: 38 Hi Hugh, On Sat, 16 Apr 2016 16:29:44 -0700 (PDT) Hugh Dickins wrote: > > Please add this fix after > huge-tmpfs-fix-mlocked-meminfo-track-huge-unhuge-mlocks.patch > for later merging into it. I expect this to fix a build problem found > by robot on an x86_64 randconfig. I was not able to reproduce the error, > but I'm growing to realize that different optimizers behave differently. > > Reported-by: kbuild test robot > Signed-off-by: Hugh Dickins > --- > mm/rmap.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > --- a/mm/rmap.c > +++ b/mm/rmap.c > @@ -1445,8 +1445,12 @@ static int try_to_unmap_one(struct page > */ > if (!(flags & TTU_IGNORE_MLOCK)) { > if (vma->vm_flags & VM_LOCKED) { > + int nr_pages = 1; > + > + if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) && !pte) > + nr_pages = HPAGE_PMD_NR; > /* Holding pte lock, we do *not* need mmap_sem here */ > - mlock_vma_pages(page, pte ? 1 : HPAGE_PMD_NR); > + mlock_vma_pages(page, nr_pages); > ret = SWAP_MLOCK; > goto out_unmap; > } Added to linux-next today. -- Cheers, Stephen Rothwell