From nobody Sun Feb 8 14:10:46 2026 Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) (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 89DDA20B7E1 for ; Mon, 22 Dec 2025 00:49:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766364567; cv=none; b=Xy30jIOHVoC2KitA/NX9wJKs1Xa2ss8cAhmOJpZia7DFoRm6ge9SUbfPcL+5LCLchVZfGL2vE7nFhBB+MXuaP4N/4n3FHXl9h7pRcexzUnp82fBozBApKBa75CJWtkc7m0rpy143lwDi5X8OMoAUGC6eedrZwJQHwTZnZamuyak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766364567; c=relaxed/simple; bh=PYz5LGEPFVA5K7LEO2RLxyv5BGghR4alllEhsANbZNQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JJ0LicpU1ludbUgdgLP9PeVEu+ZBUXIjvgoH9bEmbpDYfS/OwiOs41X6iTRg/x4xmI/P54LO99xD/otFr+fBDh1Hq9rwQZQFV5YWO1r74n8dGPVb77tQeJB9618uGNi2zvB/r/YKGuygO0GOlhBroX/qSF8yeFz867yzUFDtFL8= 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=KzyzXLgO; arc=none smtp.client-ip=209.85.216.65 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="KzyzXLgO" Received: by mail-pj1-f65.google.com with SMTP id 98e67ed59e1d1-34c7d0c5ddaso1855077a91.0 for ; Sun, 21 Dec 2025 16:49:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766364565; x=1766969365; 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=a10/yyFUtLAmkdxBH2DQmudL6S0po5mlrbiaBGfSCN0=; b=KzyzXLgOkkFN/BrBIaREMCIni9v/MAwjGrTVgZNE9jOOWgooRbE0AmOooQT1PqE/Jt 4b/c8Q6TMLOoGO/WzL0R4rcbg6vn/AksELyRhosB7qAkVosRVIBe/SAXV6KBuwaBtR+8 IByHlFQVmaZ4JgxyTtMwrHZzb+sAcU1kklVpeuNuSyS3a7vgMNdda2ylL4fOi2L/aoT6 dnN2BwR2UeF8I9kkw5FP6kQ6gUiuGJdxwrGcEPRboFniw8+rbyZOHu6BNeZw/5pZlo5z uLRpJbcYVXF94I7sWw4S4AMH1vVsfQEsT+zqZMwaG2MrbQ+Ce+/1kNsbvyLbfKqE+Hta 0+Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766364565; x=1766969365; 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=a10/yyFUtLAmkdxBH2DQmudL6S0po5mlrbiaBGfSCN0=; b=G+RjJxhNy/I8ynpJ9skxcYidtW6cy/Z+eReXfSq75gWmBkUZIVhvzL7c57PDwu6Tgp SjlriFxNwslKgHJtID5lWjEr0HK5Vybj09vofeUmmGBY7zmrBwM2mIqOK2r2exiG4bKf +2kAQZYd6SLG1VVnxwZbJ1P3PoTPU95sciiKn499lMGRROFKdGGjKaVnFk3BT5V51qF1 rPGGz60H7lf+2Shvtttz22A41awHViaIJFU/+NvT27ly3q3Na6OMsM1aURRdQ6HVrbUy hQBlFGZMnf2uKcg0N0bCj9BsmwqXx19ULehZmJPT/tGPr/9/yDUYoyxBEwNPmMyah6ye bL3g== X-Forwarded-Encrypted: i=1; AJvYcCVyXdVJIIYBVnlHcvRRrSxzmBULRfYu4/pewnj/K466TTZFSd5ajpyFnq0NZa/c8MSPDPSdrXKTyhdVKNQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxYM+BJi2mHMLIH9nfk1fZhxc6GpXYPxw/6xOTY6K71YBrW4UJc QcC5NRBOexltV3Ihn31l87XQ5yizwDaxzklQtOOgUBV+Po3jHfISQBnh X-Gm-Gg: AY/fxX49z+77fG9i06cWj1MdKHLlhwYqMXApJWP3AzSfWu9Wyc2503dQpCV4eJLv3ve uy5zjjTm2n5GdkCYsnpvfKvkdjWI3B9pg7djhofI3drEuW8cm2ts49p0K8ZKzmMfTjY7UHBFa6v ItL4MPZxF2EH6uSyPFCKW2cb0RUoJTvFgcSRn3hfAa97DLH6CIWvQGqSjeEaB6YFozpoN5+ESk9 wamEwOuq53gK/RN3C4tkixrT5QlbVHqDyNO0vsrjeo89fDdwzPN8IcyKYYY8qXv9U0Q47NxQGWF CIFvcFqLUCofP+p84g+nxopFJd4at11aLJnsIr91P0jkCrXvHHZDHFS2b8cIzQh69NZFR/ni0N9 NIClnuEHhQHY/35P6pkUK1XoJPHk9fxIdoyhN28iRW8FQ/SVrRvvI1tHvLhJBF/ljXDfb+k1CFa msmahyWiGL6r+n9QRziA6A9wViUw== X-Google-Smtp-Source: AGHT+IEMm5PsORF6eBK+myRm0k9fs0suEo4RqzGxdu08t8Dj4rsOQM/w7YKy0ZJXO7xvr+1j5f+i6g== X-Received: by 2002:a17:90b:1fc8:b0:32e:2fa7:fe6b with SMTP id 98e67ed59e1d1-34e90de1f19mr9151046a91.14.1766364564695; Sun, 21 Dec 2025 16:49:24 -0800 (PST) Received: from localhost.localdomain ([240f:34:212d:1:df7d:b611:ffaf:6d45]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c1e79620bd3sm7461832a12.4.2025.12.21.16.49.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Dec 2025 16:49:24 -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 Subject: [PATCH v2 2/3] mm: numa_emu: add document for NUMA emulation Date: Mon, 22 Dec 2025 09:48:33 +0900 Message-ID: <20251222004834.10539-3-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251222004834.10539-1-akinobu.mita@gmail.com> References: <20251222004834.10539-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 --- New 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