From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DE09C43331 for ; Sat, 28 Mar 2020 18:34:13 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EE393206E6 for ; Sat, 28 Mar 2020 18:34:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b="pvhr/4Mp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE393206E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=os.amperecomputing.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48qS6n4tnDzDqjV for ; Sun, 29 Mar 2020 05:34:09 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=os.amperecomputing.com (client-ip=40.107.220.122; helo=nam11-co1-obe.outbound.protection.outlook.com; envelope-from=hoan@os.amperecomputing.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=os.amperecomputing.com Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2122.outbound.protection.outlook.com [40.107.220.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48qS3z4g4LzDqYS for ; Sun, 29 Mar 2020 05:31:36 +1100 (AEDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AAzrEvTa/5E8UhCOuQ+KY43OdxvjKepzSCS0RP1aEPWwqkVESOqoRy69xmIhvN39qVvH/t90151cgvocrbDXI1hpwAmTnbWpScPNW+pfJtylG2gUfXWvnzYa33JiNWd0+6ZvAmROLlSuwYQls7A1RwQ49vvrm+ldd8fA5GhMRRYoZMwhPvxvUzVrWiuVINIG5gEZks+5adaSGU1iVCfBRpdkKNGiD6Hr4zYtceY5EYRYhksbtHDRxD4Qw6paY4r5Ei48yd0OKlGM7mKtkb7ayJ9PeB7TmJ3LOgoA0aXuhj/IRn5Y3hipl7JJxJtb+MycCwvrL4ly6jfSpFSF0bl46w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yyIVrsAsbqfzn9pK/jT96ImQUzYBi59QrTmo7hbAPB0=; b=eI2Qu0ND5txDUmqMZ+4TuIWQMOmx5x3QV4SUV8ixPu6tQtdNIinMw+e+oxCi0K+DbrGt7Mao/RGGGmuklOJuXtyJRZCM2wSGrxpsrqRqNDy6ghWKhQL1kRoThsJBtCFGlG8e965DX2Xqcv9eylSizH/KQok/6zXkiYkMJ+MIHpQGNy86nSLseDa2dporNP401frskPoiSUJPLemZE1XQAFbdup3dmsy6XRJ5bvIRVbBRiVWD9LYz/vpFbwWb0OdMlB66lJCOBkA3yA3xf7oLz30GG9IGeY9Yxv2kHYb2BvmTfQ9tPIsxT5IenhisixraAxlAF+52kyV4Pj4Svynbtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yyIVrsAsbqfzn9pK/jT96ImQUzYBi59QrTmo7hbAPB0=; b=pvhr/4Mp1CKgrh2J6GPaWFrlg36qCW2DFrxZpI2wyuZ/7O9kRQ0ILGmRUG4brljG17clDTTShraFmTqWM1TcKo8Bohuc6wTmSeatRLc1p4qYThKAg9oGmo6V9EhypeTZx+JpJyrJ5cEzjg0u0qCIlcltwiFL4XX3PWPrvmyCdWE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hoan@os.amperecomputing.com; Received: from BYAPR01MB5494.prod.exchangelabs.com (2603:10b6:a03:127::30) by BYAPR01MB5205.prod.exchangelabs.com (2603:10b6:a03:7f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.19; Sat, 28 Mar 2020 18:31:32 +0000 Received: from BYAPR01MB5494.prod.exchangelabs.com ([fe80::a979:b2e2:fdaf:1ccb]) by BYAPR01MB5494.prod.exchangelabs.com ([fe80::a979:b2e2:fdaf:1ccb%6]) with mapi id 15.20.2835.026; Sat, 28 Mar 2020 18:31:31 +0000 From: Hoan Tran To: Catalin Marinas , Will Deacon , Andrew Morton , Michal Hocko , Vlastimil Babka , Oscar Salvador , Pavel Tatashin , Mike Rapoport , Alexander Duyck , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "David S. Miller" , Heiko Carstens , Vasily Gorbik , Christian Borntraeger Subject: [PATCH v3 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA Date: Sat, 28 Mar 2020 11:31:17 -0700 Message-Id: <1585420282-25630-1-git-send-email-Hoan@os.amperecomputing.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain X-ClientProxiedBy: CY4PR13CA0013.namprd13.prod.outlook.com (2603:10b6:903:32::23) To BYAPR01MB5494.prod.exchangelabs.com (2603:10b6:a03:127::30) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from engdev037.mustanglab.us.amcc (4.28.12.214) by CY4PR13CA0013.namprd13.prod.outlook.com (2603:10b6:903:32::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.9 via Frontend Transport; Sat, 28 Mar 2020 18:31:29 +0000 X-Mailer: git-send-email 1.8.3.1 X-Originating-IP: [4.28.12.214] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6bc8ebec-62c0-4b6c-45f6-08d7d3463c94 X-MS-TrafficTypeDiagnostic: BYAPR01MB5205:|BYAPR01MB5205: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 03569407CC X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR01MB5494.prod.exchangelabs.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(4636009)(376002)(396003)(136003)(39840400004)(366004)(346002)(6512007)(7416002)(107886003)(16526019)(6486002)(26005)(81166006)(4326008)(8936002)(2616005)(6666004)(186003)(956004)(8676002)(81156014)(316002)(66476007)(52116002)(6506007)(66946007)(66556008)(86362001)(478600001)(5660300002)(110136005)(2906002)(921003)(1121003); DIR:OUT; SFP:1102; Received-SPF: None (protection.outlook.com: os.amperecomputing.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WYVPVK5y7NP34qUje8I23KdDawNs+tb8HJyMIjz52VTZbp9SEP0bwe9nSeSBLDK7eGGVuozVKnFcoWXdF/IfUmIep1zd5h3IayfnquqBfSmGlflemYraEg95vigKG9BFl3WkAye6VMb7greQ/TChm2ZfLEcC8liXlQUALr/aaxlXRexhC1wg3N5hWqpoVmhwW4773EJAPZlYZr5bxk4gQILCg2H8hs44rBwoW9WIpWXm8xqaz7xgl6B8o4DsOgnuBoL55OPB2WbDqktjVv+A/8/kkKFZrtTxqfF/WP4OQ1aRgtvSDSo5f2CGAGBficgZkHsaX867Z3n1+Dwe4FdSpOKabvpDXcZntLAiZ/4lx5OcnVp1gnO/RIwOSlrwDvQl9VFxEaQ6j6ABTqxnZDDp2VCJMnxJ2ZYSa6/7x5gvLSF1HJAArkIzS6js3ZIuiS5QKBSB8h15Wy5pjzf9VTQbOvjfDBiWq+23bzPcxn5+kgbv5xsS4Uoj00IgUo5Zl++G X-MS-Exchange-AntiSpam-MessageData: u2C/PpOEwNVO/uMxt6n0UGhoNYCVYu8qcrV1J3PsGlfBFHjZOPX6oZ4Dic7NmKpThfj03b7f9i2B/FqzqhWOrqr16SA+NKKhslZSYOsgX9lg6Uq26ZAvFuEro159xpdy/ZVlDNc3RU2LN++2Ty/Qvw== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6bc8ebec-62c0-4b6c-45f6-08d7d3463c94 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2020 18:31:31.7234 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: y439rLwrGhveJWJRVvssoUuoAqjBspUJ/DjxPK64/GziAO6YaXpXpo1ueiHaa5BLzAibQMAQPpEYiF+eBkMig7o4poQbp26PfZ3JebNi+k4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR01MB5205 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390@vger.kernel.org, lho@amperecomputing.com, mmorana@amperecomputing.com, x86@kernel.org, linux-kernel@vger.kernel.org, "open list:MEMORY MANAGEMENT" , Hoan Tran , sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" In NUMA layout which nodes have memory ranges that span across other nodes, the mm driver can detect the memory node id incorrectly. For example, with layout below Node 0 address: 0000 xxxx 0000 xxxx Node 1 address: xxxx 1111 xxxx 1111 Note: - Memory from low to high - 0/1: Node id - x: Invalid memory of a node When mm probes the memory map, without CONFIG_NODES_SPAN_OTHER_NODES config, mm only checks the memory validity but not the node id. Because of that, Node 1 also detects the memory from node 0 as below when it scans from the start address to the end address of node 1. Node 0 address: 0000 xxxx xxxx xxxx Node 1 address: xxxx 1111 1111 1111 This layout could occur on any architecture. Most of them enables this config by default with CONFIG_NUMA. This patch, by default, enables CONFIG_NODES_SPAN_OTHER_NODES or uses early_pfn_in_nid() for NUMA. v3: * Revise the patch description V2: * Revise the patch description Hoan Tran (5): mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA powerpc: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES x86: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES sparc: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES s390: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES arch/powerpc/Kconfig | 9 --------- arch/s390/Kconfig | 8 -------- arch/sparc/Kconfig | 9 --------- arch/x86/Kconfig | 9 --------- mm/page_alloc.c | 2 +- 5 files changed, 1 insertion(+), 36 deletions(-) -- 1.8.3.1