From patchwork Fri Jul 6 16:08:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 10512071 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 49DA560532 for ; Fri, 6 Jul 2018 16:18:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 396602871B for ; Fri, 6 Jul 2018 16:18:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 298BA28720; Fri, 6 Jul 2018 16:18:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8E6B2871B for ; Fri, 6 Jul 2018 16:18:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A61EE6B0007; Fri, 6 Jul 2018 12:18:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A10E46B0008; Fri, 6 Jul 2018 12:18:00 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FFA76B000A; Fri, 6 Jul 2018 12:18:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f69.google.com (mail-pl0-f69.google.com [209.85.160.69]) by kanga.kvack.org (Postfix) with ESMTP id 4F09C6B0007 for ; Fri, 6 Jul 2018 12:18:00 -0400 (EDT) Received: by mail-pl0-f69.google.com with SMTP id f5-v6so4879757plf.18 for ; Fri, 06 Jul 2018 09:18:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:subject:from :to:cc:date:message-id:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=TgK8yP6tAB6hQls7yFfKi6eRDxJuR0Qe0KNnyOnhf9Q=; b=M+scE6D0reVfNjsxqvQuuqfT5lmI/QiPRiFc7dDSBi3ku9dq7VHcZD4lF2ux0UfzOQ qHxNwGq5Kjb3hJe/EfnCJiP7uqXKdR0N0Ce0cWtB8BEdVBNmxGXPZMkdAZEoyT4whbHX cS9wnlfaZ8Y0BK3OaIbMksMhVgrd2D+y1MhMtNT4bXavXv9w89lLSZ49OVFocBUV0IS/ yIXWhvAdSrf+PYB7e8wufElEOHMB+vDDLWfsgQW1ehFTyQ0eHdAsAyoqlg99/5OHXWqA nNE03QWjcbjEOGiXsq+StNu0UPRx1xFp7mAIrDp97pkqxv6304fMFwT7i0N7zlcNuSKW 54EA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 134.134.136.20 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: APt69E2wGIqOyiMgRUzWgXlg1oH7gRaXzvxtNG42XIxbj0qOT+qZlRQu koW5SaBadkmnvW6rm6sX0ToUi7g6YrQDtb0hDV/lwOrNHmTUXBzzL7T8VcIISMadXvWyeL84+ud RhzQWfMKONCy/jNjvbyJyJmoJagb0xNiYthxb1XlP0WEvPRwCopUv3AVwix1Wjl0JHA== X-Received: by 2002:a17:902:ac83:: with SMTP id h3-v6mr10895065plr.17.1530893879897; Fri, 06 Jul 2018 09:17:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeFeESQEDwlMZSv9wF8xcucYClnFsPwx5ZHujKmkOg5YwzqWOMJDvXfIxAgbwDbjDHD1Go1 X-Received: by 2002:a17:902:ac83:: with SMTP id h3-v6mr10895016plr.17.1530893879143; Fri, 06 Jul 2018 09:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530893879; cv=none; d=google.com; s=arc-20160816; b=zPKtdIqb0vFuRVRX49H4F7iVuiM6NbDXf5QVXqVbT2Xk5OTrKKRCZMdFuEyKbnQEdA lJq0mhMNLbjcmwQ/li512f/eN5l4TkDh9moJRV99rIL8d6WgL/u0JWTc0c5GXuCGyMkC pOoOPyHnLg4CjBda7zFsir2Rj9tKIZ48OqSaWA7+zN52YSE4l6HoOHMc374OqiRqYcxK ggrt0+FRvcb1nOpvMmfHbDiRgA3ZKK0J7d8SnZg30OyWO0TpRBOKkKfMt7V2Dbto9C7J p9MjtVhISGULEcuzWbMY+c949QjmAm1tJuLnhwplAcLU1MtbgnKqderauBVHxFpinPw9 iocA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:cc:to:from:subject :arc-authentication-results; bh=TgK8yP6tAB6hQls7yFfKi6eRDxJuR0Qe0KNnyOnhf9Q=; b=my2tvMXj7qDlyCrWQwLCdxHqeuk0WDpm92Ap7J0gWvHDTfarlLj0SZ/3Aaq4GghK97 lcW5ZtwRIxj27qcrM0SwEPW3OT9TcQwf53x/pyX+zO2rY7FL9JU+R62902+daulk9MZs zhBp264TB3C/MGPZ0/c4XgdSEj5/+dzsd5Jx6YV/BrpRfrW2yqdlcAwJCExdUpOVsuok 4fYWroRu1VEEerjlc8X6EiyLBCPwjBk4n2r0pfW/eZ7sEdZtTn0lzVD25QzraeZFPWht J1ygWHDGmnE7uj4yhpVVo5qMjXCPSWHpS5n6kkGLWS0fXYVS0vauTAkQ7cVIs0fy5JuO YzNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 134.134.136.20 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga02.intel.com (mga02.intel.com. [134.134.136.20]) by mx.google.com with ESMTPS id l3-v6si7988687pld.223.2018.07.06.09.17.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jul 2018 09:17:59 -0700 (PDT) Received-SPF: pass (google.com: domain of dan.j.williams@intel.com designates 134.134.136.20 as permitted sender) client-ip=134.134.136.20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 134.134.136.20 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jul 2018 09:17:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,316,1526367600"; d="scan'208";a="213953612" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga004.jf.intel.com with ESMTP; 06 Jul 2018 09:17:58 -0700 Subject: [PATCH v2 1/2] x86/numa_emulation: Fix emulated-to-physical node mapping From: Dan Williams To: mingo@kernel.org Cc: Wei Yang , David Rientjes , Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar , x86@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, x86@kernel.org Date: Fri, 06 Jul 2018 09:08:01 -0700 Message-ID: <153089328103.27680.14778434392225818887.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <153089327581.27680.11402583130804677094.stgit@dwillia2-desk3.amr.corp.intel.com> References: <153089327581.27680.11402583130804677094.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Without this change the distance table calculation for emulated nodes may use the wrong numa node and report an incorrect distance. Cc: Wei Yang Cc: David Rientjes Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Signed-off-by: Dan Williams --- arch/x86/mm/numa_emulation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c index 34a2a3bfde9c..22cbad56acab 100644 --- a/arch/x86/mm/numa_emulation.c +++ b/arch/x86/mm/numa_emulation.c @@ -61,7 +61,7 @@ static int __init emu_setup_memblk(struct numa_meminfo *ei, eb->nid = nid; if (emu_nid_to_phys[nid] == NUMA_NO_NODE) - emu_nid_to_phys[nid] = nid; + emu_nid_to_phys[nid] = pb->nid; pb->start += size; if (pb->start >= pb->end) {