From nobody Mon Feb 9 17:56:35 2026 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B44E4611EC for ; Thu, 8 Jan 2026 10:16:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767867399; cv=none; b=TNs1omhKWQo0o8zzrd+z5vWlg9SYtLDKsDvI+/EnRZfDrrZBlSTBHpB68EL9kTtZuTycDjIjzF+eFdUq6OI4onT3ZYFkIj9m6lCtztM7bXAVeoLsPxU1CLFGrxL9SsaaZSURD+wTS8uteJtBD4VoCXNHz60x439DHasXsTztg7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767867399; c=relaxed/simple; bh=0ItxBjCWeeYPymcdVA6acSuKxkPEbVxqgc4wC6gsjtc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uJSPNBQOkEn/jhaP0feR85ThTdu1hrZDSuH0mAgrrUAL/oy794oU5wCxGKPNmpUQ9YP1tRfTjlYhErbp6+kL8OmwzvEgtH1lZLDsxorwECfaWXdp89hMWI999W3fVScy7mkGmoPBud4rFM7OT71vvnOHd04HTMyXQ4ayATlN3m8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=j52VY0p1; arc=none smtp.client-ip=209.85.210.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j52VY0p1" Received: by mail-pf1-f193.google.com with SMTP id d2e1a72fcca58-7fc0c1d45a4so1834123b3a.0 for ; Thu, 08 Jan 2026 02:16:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767867392; x=1768472192; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WKs0XTtJuJVxxVwPA++DZZZ+CNpKQV3ASKLDqcig+Cw=; b=j52VY0p1Xy8PNl31uamlftkilNrQ2tMIpuUFGwtjGAjDpzTFfcrTwI0oXVBF+MWpn6 HhGL5u6WaBtgm3LQyuk67R61X9+Oz3itgjBWO5GiyfNBbybUG1QGa3GpSwnWXGY7kVJD B8p6hU9kqlHH7EitI8ON5DyBmWyTUW8frt43igNYRTxjPcV32KGYM9AmrITkZPOiCoKU i8u5zGPJVyyPphQybIlNYLv+8USX0LDkZt7/20KgMQCpUes6FJwspzYmA7E/m0bIq0zH uUficfllC+QgTFdUYqkSeZVrzuH3bYiY9YcnWQzkb+dNOsCRkkAXbX4qM9yHhvAX6xYF ymnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767867392; x=1768472192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=WKs0XTtJuJVxxVwPA++DZZZ+CNpKQV3ASKLDqcig+Cw=; b=Beye/O4uHVGQ7mZVPTX5m0iu+G2A6TuuqzUGW9F0Lrhe/vQJ9r32f7ogG3mO/H2IqA Nj2k8Q7ckHYRytK6LWdx99qbeq9GNSVgK7LZCd0hma3wt9b75tgAPAjPOl2Y11nEmvCx neTFUdW+EEP1W4T8MU/yRd0Pv4rXX/wcbwU+9BYdxILpluYMkYSe+0W5bXhkbod1WjsV G5zpUjk7w4fwNZoGIoBoSCmUMyznMu3JBOg15fgJIf/Xpk+jFFJTEvnn9sMYHvX2oS6N WyPgUJw6zD1Qfn9okmMJUk8Nd5I8FzEMIbx1xj+Q9hyB2UdNnAg9PmNmFee5utQND0Qo dUXA== X-Forwarded-Encrypted: i=1; AJvYcCXunTBvfcpnlB/NuFMf+Qi0rC8nraGvA7YYGNDh+79zj7gKO0Ihcq8jLQYKU7vQWqidkbCM/bJjjqMO5C8=@vger.kernel.org X-Gm-Message-State: AOJu0YwefqvM3dYNG6rTupqE5Srr/iK8D6VVqKWXwnX9HTHmI3HUSmbT qMWV0GTmimaVO6DBmhvU8Ca+WTBg4PWsOHhLU8KYRKkvZKddGh0190EU X-Gm-Gg: AY/fxX4uh1qZcPxzrCjxUQd+TxTUzzYPXPQZTA0ChDR2j/cSAOBZnGy38vJmNCWbaIy XsjYCMLusm1aw/Q+1Ew4HE1whF3kW8Im5HjUZAdYuKbDEdXHqgsfeKT3QAXSD95lH5aLyIC0+0L KDDf9BRR4w3qhhEZdbw6eAmrlPznXizeN2y+LAHlDXl+E04qOP/b46LMsVCnZWVO57830txfZ7h cgqQzJR5JVqwRQaWeVn7TXnq6cl6XKiYScfrq9vkXHEZ7Jz/se29XHFBcdUCXhEIgiBaLjBMJrU Cb45q0xxGTdqk5yJFSxjlOdtP0vlOR1o06/PdD+eEOUJYjIrtVjs+hBhkjFDT6mPdomtQEkn/0v TpW00ZddVoYrJPjDKrs0trqCJvOkf9NDiXlCu7qgCJuaILfElf9wiuE6XgQYNK0eR4DQ7Lc0NS5 /8ASkF5saSkBTLZGDYO9ibmuJV X-Google-Smtp-Source: AGHT+IG5cjHWe4nCIW20Z8QJTPxi/x38oc0S4rLZqrg1Nkqq2kgc6NrGn9A7eOqoxL6kXyUHFyaZNg== X-Received: by 2002:a05:6a21:3285:b0:35f:b96d:af0f with SMTP id adf61e73a8af0-3898f94ca6emr4948333637.26.1767867390988; Thu, 08 Jan 2026 02:16:30 -0800 (PST) Received: from localhost.localdomain ([240f:34:212d:1:8352:dfa:3b18:eb4e]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a3e3c49299sm73785245ad.42.2026.01.08.02.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jan 2026 02:16:30 -0800 (PST) From: Akinobu Mita To: akinobu.mita@gmail.com Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, hannes@cmpxchg.org, david@kernel.org, mhocko@kernel.org, zhengqi.arch@bytedance.com, shakeel.butt@linux.dev, lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com, vbabka@suse.cz, rppt@kernel.org, surenb@google.com, bingjiao@google.com Subject: [PATCH v3 2/3] mm: numa_emu: add document for NUMA emulation Date: Thu, 8 Jan 2026 19:15:34 +0900 Message-ID: <20260108101535.50696-3-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260108101535.50696-1-akinobu.mita@gmail.com> References: <20260108101535.50696-1-akinobu.mita@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add a document with a brief explanation of numa emulation and how to use the newly added "numa_emulation.adistance=3D" kernel cmdline parameter. Signed-off-by: Akinobu Mita Reviewed-by: Jonathan Cameron --- v2: - added in v2 Documentation/mm/index.rst | 1 + Documentation/mm/numa_emulation.rst | 30 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Documentation/mm/numa_emulation.rst diff --git a/Documentation/mm/index.rst b/Documentation/mm/index.rst index 7aa2a8886908..7d628edd6a17 100644 --- a/Documentation/mm/index.rst +++ b/Documentation/mm/index.rst @@ -24,6 +24,7 @@ see the :doc:`admin guide <../admin-guide/mm/index>`. page_cache shmfs oom + numa_emulation =20 Unsorted Documentation =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D diff --git a/Documentation/mm/numa_emulation.rst b/Documentation/mm/numa_em= ulation.rst new file mode 100644 index 000000000000..dce9f607c031 --- /dev/null +++ b/Documentation/mm/numa_emulation.rst @@ -0,0 +1,30 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +NUMA emulation +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +If CONFIG_NUMA_EMU is enabled, you can create fake NUMA nodes with +``numa=3Dfake=3D`` kernel cmdline option. +See Documentation/admin-guide/kernel-parameters.txt and +Documentation/arch/x86/x86_64/fake-numa-for-cpusets.rst for more informati= on. + + +Multiple Memory Tiers Creation +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D + +The "numa_emulation.adistance=3D" kernel cmdline option allows you to set +the abstract distance for each NUMA node. + +For example, you can create two fake nodes, each in a different memory +tier by booting with "numa=3Dfake=3D2 numa_emulation.adistance=3D576,704". +Here, the abstract distances of node0 and node1 are set to 576 and 706, +respectively. + +Each memory tier covers an abstract distance chunk size of 128. Thus, +nodes with abstract distances between 512 and 639 are classified into the +same memory tier, and nodes with abstract distances between 640 and 767 +are classified into the next slower memory tier. + +The abstract distance of fake nodes not specified in the parameter will +be the default DRAM abstract distance of 576. --=20 2.43.0