summaryrefslogtreecommitdiff
path: root/drivers/phy/eswin/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorSang-Heon Jeon <ekffu200098@gmail.com>2026-04-17 22:58:05 +0900
committerMike Rapoport (Microsoft) <rppt@kernel.org>2026-06-02 08:34:03 +0300
commit3a3fc1dfd6a958615ebaab8fb251e89fc2b3f2f2 (patch)
treee0d9a543b913e3725203177ad854f82cc758693e /drivers/phy/eswin/git@git.tavy.me:linux.git
parente43ffb69e0438cddd72aaa30898b4dc446f664f8 (diff)
mm/fake-numa: fix under-allocation detection in uniform split
When splitting NUMA node uniformly, split_nodes_size_interleave_uniform() returns the next absolute node ID, not the number of nodes created. The existing under-allocation detection logic compares next absolute node ID (ret) and request count (n), which only works when nid starts at 0. For example, on a system with 2 physical NUMA nodes (node 0: 2GB, node 1: 128MB) and numa=fake=8U, 8 fake nodes are successfully created from node 0 and split_nodes_size_interleave_uniform() returns 8. For node 1, fake node nid starts at 8, but only 4 fake nodes are created due to current FAKE_NODE_MIN_SIZE being 32MB, and split_nodes_size_interleave_uniform() returns 12. By existing under-allocation detection logic, "ret < n" (12 < 8) is false, so the under-allocation will not be detected. Fix under-allocation detection logic to compare the number of actually created nodes (ret - nid) against the request count (n). Also skip under-allocation detection logic for memoryless physical nodes where no fake nodes are created. Also, fix the outdated comment describing split_nodes_size_interleave_uniform() to match the actual return value. Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Reported-by: Donghyeon Lee <asd142513@gmail.com> Reported-by: Munhui Chae <mochae@student.42seoul.kr> Fixes: cc9aec03e58f ("x86/numa_emulation: Introduce uniform split capability") # 4.19 Link: https://patch.msgid.link/20260417135805.1758378-1-ekffu200098@gmail.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions