From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753447AbbAaJMJ (ORCPT ); Sat, 31 Jan 2015 04:12:09 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:61980 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752288AbbAaJMD (ORCPT ); Sat, 31 Jan 2015 04:12:03 -0500 Date: Sat, 31 Jan 2015 09:11:53 +0000 From: Steve Capper To: Mel Gorman Cc: Andrew Morton , Mark Brown , Catalin Marinas , Will Deacon , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , linux-next@vger.kernel.org Subject: Re: [PATCH] mm: remove remaining references to NUMA hinting bits and helpers -fix Message-ID: <20150131091153.GA31002@linaro.org> References: <20150128152412.GX21293@sirena.org.uk> <20150130100406.GK2395@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150130100406.GK2395@suse.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 30, 2015 at 10:04:06AM +0000, Mel Gorman wrote: > The patch "mm: remove remaining references to NUMA hinting bits and helpers" > was meant to remove NUMA hinting bits and helpers but broke is_swap_pte. > From the original bug report > > For at least the past couple of days tests of libhugetlbfs have > been hanging on mustang in the mlock test running ARMv8 defconfig > with both 32 bit and 64 bit userspace - after the mprotect test > (the one before it) we get no console output for several hours so > it appears that the test has deadlocked. The tail of the log is: > > | find_path (2M: 64): PASS > | unlinked_fd (2M: 64): PASS > | readback (2M: 64): PASS > | truncate (2M: 64): PASS > | shared (2M: 64): PASS > | mprotect (2M: 64): PASS > > This patch should address the problem and is a fix to the mmotm patch > mm-remove-remaining-references-to-numa-hinting-bits-and-helpers.patch > > Reported-by: Mark Brown > Signed-off-by: Mel Gorman Acked-by: Steve Capper > --- > include/linux/swapops.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/swapops.h b/include/linux/swapops.h > index 73ca28070a92..cedf3d3c373f 100644 > --- a/include/linux/swapops.h > +++ b/include/linux/swapops.h > @@ -54,7 +54,7 @@ static inline pgoff_t swp_offset(swp_entry_t entry) > /* check whether a pte points to a swap entry */ > static inline int is_swap_pte(pte_t pte) > { > - return !pte_none(pte); > + return !pte_none(pte) && !pte_present(pte); > } > #endif > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Capper Subject: Re: [PATCH] mm: remove remaining references to NUMA hinting bits and helpers -fix Date: Sat, 31 Jan 2015 09:11:53 +0000 Message-ID: <20150131091153.GA31002@linaro.org> References: <20150128152412.GX21293@sirena.org.uk> <20150130100406.GK2395@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-wi0-f173.google.com ([209.85.212.173]:59004 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751783AbbAaJMD (ORCPT ); Sat, 31 Jan 2015 04:12:03 -0500 Received: by mail-wi0-f173.google.com with SMTP id r20so7580615wiv.0 for ; Sat, 31 Jan 2015 01:12:00 -0800 (PST) Content-Disposition: inline In-Reply-To: <20150130100406.GK2395@suse.de> Sender: linux-next-owner@vger.kernel.org List-ID: To: Mel Gorman Cc: Andrew Morton , Mark Brown , Catalin Marinas , Will Deacon , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , linux-next@vger.kernel.org On Fri, Jan 30, 2015 at 10:04:06AM +0000, Mel Gorman wrote: > The patch "mm: remove remaining references to NUMA hinting bits and helpers" > was meant to remove NUMA hinting bits and helpers but broke is_swap_pte. > From the original bug report > > For at least the past couple of days tests of libhugetlbfs have > been hanging on mustang in the mlock test running ARMv8 defconfig > with both 32 bit and 64 bit userspace - after the mprotect test > (the one before it) we get no console output for several hours so > it appears that the test has deadlocked. The tail of the log is: > > | find_path (2M: 64): PASS > | unlinked_fd (2M: 64): PASS > | readback (2M: 64): PASS > | truncate (2M: 64): PASS > | shared (2M: 64): PASS > | mprotect (2M: 64): PASS > > This patch should address the problem and is a fix to the mmotm patch > mm-remove-remaining-references-to-numa-hinting-bits-and-helpers.patch > > Reported-by: Mark Brown > Signed-off-by: Mel Gorman Acked-by: Steve Capper > --- > include/linux/swapops.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/swapops.h b/include/linux/swapops.h > index 73ca28070a92..cedf3d3c373f 100644 > --- a/include/linux/swapops.h > +++ b/include/linux/swapops.h > @@ -54,7 +54,7 @@ static inline pgoff_t swp_offset(swp_entry_t entry) > /* check whether a pte points to a swap entry */ > static inline int is_swap_pte(pte_t pte) > { > - return !pte_none(pte); > + return !pte_none(pte) && !pte_present(pte); > } > #endif > From mboxrd@z Thu Jan 1 00:00:00 1970 From: steve.capper@linaro.org (Steve Capper) Date: Sat, 31 Jan 2015 09:11:53 +0000 Subject: [PATCH] mm: remove remaining references to NUMA hinting bits and helpers -fix In-Reply-To: <20150130100406.GK2395@suse.de> References: <20150128152412.GX21293@sirena.org.uk> <20150130100406.GK2395@suse.de> Message-ID: <20150131091153.GA31002@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Jan 30, 2015 at 10:04:06AM +0000, Mel Gorman wrote: > The patch "mm: remove remaining references to NUMA hinting bits and helpers" > was meant to remove NUMA hinting bits and helpers but broke is_swap_pte. > From the original bug report > > For at least the past couple of days tests of libhugetlbfs have > been hanging on mustang in the mlock test running ARMv8 defconfig > with both 32 bit and 64 bit userspace - after the mprotect test > (the one before it) we get no console output for several hours so > it appears that the test has deadlocked. The tail of the log is: > > | find_path (2M: 64): PASS > | unlinked_fd (2M: 64): PASS > | readback (2M: 64): PASS > | truncate (2M: 64): PASS > | shared (2M: 64): PASS > | mprotect (2M: 64): PASS > > This patch should address the problem and is a fix to the mmotm patch > mm-remove-remaining-references-to-numa-hinting-bits-and-helpers.patch > > Reported-by: Mark Brown > Signed-off-by: Mel Gorman Acked-by: Steve Capper > --- > include/linux/swapops.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/swapops.h b/include/linux/swapops.h > index 73ca28070a92..cedf3d3c373f 100644 > --- a/include/linux/swapops.h > +++ b/include/linux/swapops.h > @@ -54,7 +54,7 @@ static inline pgoff_t swp_offset(swp_entry_t entry) > /* check whether a pte points to a swap entry */ > static inline int is_swap_pte(pte_t pte) > { > - return !pte_none(pte); > + return !pte_none(pte) && !pte_present(pte); > } > #endif >