From patchwork Fri Jan 30 10:04:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 5748591 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D68DBBF440 for ; Fri, 30 Jan 2015 10:06:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D030120225 for ; Fri, 30 Jan 2015 10:06:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E05820222 for ; Fri, 30 Jan 2015 10:06:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YH8RK-00050I-6X; Fri, 30 Jan 2015 10:04:38 +0000 Received: from cantor2.suse.de ([195.135.220.15] helo=mx2.suse.de) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YH8RG-0004u0-WE for linux-arm-kernel@lists.infradead.org; Fri, 30 Jan 2015 10:04:35 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8762AAB43; Fri, 30 Jan 2015 10:04:09 +0000 (UTC) Date: Fri, 30 Jan 2015 10:04:06 +0000 From: Mel Gorman To: Andrew Morton Subject: [PATCH] mm: remove remaining references to NUMA hinting bits and helpers -fix Message-ID: <20150130100406.GK2395@suse.de> References: <20150128152412.GX21293@sirena.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150130_020435_227343_7B5335D0 X-CRM114-Status: GOOD ( 15.44 ) X-Spam-Score: -5.0 (-----) Cc: Steve Capper , Catalin Marinas , Will Deacon , "linux-kernel@vger.kernel.org" , Mark Brown , linux-next@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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