Message ID | 20240425071929.18004-9-richard.weiyang@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21B3FC10F1A for <linux-mm@archiver.kernel.org>; Thu, 25 Apr 2024 07:20:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 98C556B0082; Thu, 25 Apr 2024 03:20:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C7DD6B009E; Thu, 25 Apr 2024 03:20:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 71C916B009F; Thu, 25 Apr 2024 03:20:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 4ED436B0082 for <linux-mm@kvack.org>; Thu, 25 Apr 2024 03:20:11 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 05990A1F79 for <linux-mm@kvack.org>; Thu, 25 Apr 2024 07:20:11 +0000 (UTC) X-FDA: 82047205422.22.3BAF3E1 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by imf28.hostedemail.com (Postfix) with ESMTP id 6D2E8C0013 for <linux-mm@kvack.org>; Thu, 25 Apr 2024 07:20:09 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=BVQ67WuO; spf=pass (imf28.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714029609; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=AKYbx6j7ZXYfR5a5p47YlGuC73Kx/pjwrf4JIoPEeH4=; b=q0ULDcI6I/O3WoEMk6rhhSi9ZHZw1Uvr8500ULFe9LocLgaYg6rbKR8kf653ZurUasVZEy TQwruXwbBX+ehbhGFtl6olmR6By1Hi/XBWK4gkUUKV9NATwXVx6h8kzNnXROP+5W1yhahc TUPRlrXo6xf19TNtDihxew5m9oqC6U8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714029609; a=rsa-sha256; cv=none; b=zs4UPBApb3qdZgybHxZPv/NjaLbKo426pckMLnw70HXjM3bW9zo+MB+yqygsoC/Pkm7i7p nc8E/yLzuiNqUNEsAWhKjXAEJQUTpH5vgGtIpjf50FRhmQB2eJjWQilSa8ya5/XpkmZJxi svVsgKUSO4lMrZTgDfI2W6LC6TZRl7Y= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=BVQ67WuO; spf=pass (imf28.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-571bddddbc2so670924a12.1 for <linux-mm@kvack.org>; Thu, 25 Apr 2024 00:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714029608; x=1714634408; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=AKYbx6j7ZXYfR5a5p47YlGuC73Kx/pjwrf4JIoPEeH4=; b=BVQ67WuOWyN5SyJ/+L5fpPsH9y/JnP/IiZuTOnEBKJRVdWEOfegN3VNXR1ZZqSBUJF iK40CEQn4zYSkp5r2ujkAywuXDGi1jBqwjMtiNYg7CuCECCy3yVOP31PRKL4g1yM6TSs axDjZeFd35YkZZp9dS0UuK6Lot5+y/gGmJkLSXPmd2cnIX6UipIqivpooQGUkUfuf4lR 07VXJHVIHjzgMlx+UUDDt3KrKMwB7z3ZoOJoYuH1mseXaXbhkhkbSXH0XSeBineAO9qx itCe2oetqUXF4ct54nsUJcrlg6STD0TMw5JT7JzH7jOLvE/qSyUwiMN9qAnIyW3nOLi9 nLqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714029608; x=1714634408; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AKYbx6j7ZXYfR5a5p47YlGuC73Kx/pjwrf4JIoPEeH4=; b=e5KOLuGxW04WH8ziOsL1kKczVLJHQ0NDGWtIxc9iFNScunZ6SjjL8a8uKxYV6Tocjw 3jNUcLmWMMWTr4XXfijXHWxWsFBYEdMThCUArk6qgixgCrEwbnxSLpIU+HEAisXeN6Zs nr+mWi4N/Ibs9y/zRioxxuEQVarcW40GXrUdECK512CCJPbiA+qd1OhBTqsKI6MQJOS1 Wn2tefVvi5DvSnkKebZYr7V4mQ5pDOi49NMGHteQFrv2H9Jsa5FzOAxKh+ajlH3ivp0X fcVYYY94JbahW2rO/hpRzN/ZTzAGCxW/Mw8nGOvCaXfZq7ZZQbTJ15r2r37NTF8Y25yf TLTg== X-Gm-Message-State: AOJu0Yya8mSPXRCdo3B/8MjwJClt+m4H5+Cgqkl6exuEtAsBDSNUecT1 IlRWIFHjc7PAsKgNbzWoPYCP0tF5oh4sS+gXucHZowzkT6jsm7Ep X-Google-Smtp-Source: AGHT+IHGeYnhhQRHsxGDPViDbhgK3bCGNr0C94MkfrkflHXjmajvh8YEMnGNcUFX3PGBfk26Qm2c9Q== X-Received: by 2002:a50:8a9b:0:b0:568:b622:f225 with SMTP id j27-20020a508a9b000000b00568b622f225mr130177edj.30.1714029608041; Thu, 25 Apr 2024 00:20:08 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id i8-20020aa7c9c8000000b00571c1df911fsm8168031edt.37.2024.04.25.00.20.07 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2024 00:20:07 -0700 (PDT) From: Wei Yang <richard.weiyang@gmail.com> To: rppt@kernel.org, akpm@linux-foundation.org Cc: linux-mm@kvack.org, Wei Yang <richard.weiyang@gmail.com> Subject: [Patch v2 8/8] mm/memblock: default region's nid may be MAX_NUMNODES Date: Thu, 25 Apr 2024 07:19:29 +0000 Message-Id: <20240425071929.18004-9-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240425071929.18004-1-richard.weiyang@gmail.com> References: <20240425071929.18004-1-richard.weiyang@gmail.com> X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 6D2E8C0013 X-Stat-Signature: 19cqhspc1qott1wrznynww7qbtt5ar3e X-Rspam-User: X-HE-Tag: 1714029609-782902 X-HE-Meta: U2FsdGVkX1+EozVj+a8sbqliKDG3bZmRi20fWqXmFk42q22WqisMJ84YXoICe0iAcucCI1XdirTx1R5iADA6RLQ+0QBMtwLqBr1va0N37BOfrXhsGnK6oa6ITDM0/ryZB2lxvlUp9uIMSifmwAJSqG8U92THb0BF94N0Z0IbqwhZBRlRZ561GH8b/9sB1xfS1ZkUunAh9R8o0F29dk5Zl6QllA21ZUm3t1BaBCvBAiB8+LAOgYNwJtEkznYiLIwjFRo5+/auXnHjcK7HxdHXu1ngOCJIvXHadmPh/YKn/ggdEEeE21EtjqktMoarLSEMupmo8rpcXgO05CP9JASk65iRoh12B09I3n+0j5ynsXlFHvBlLY9JY7FfBMcywqijkzS3Ji/9hkG8I9ufYwD02VfiKn3VdfN1n7XVFRlVxavecdmcU8lgDhcvYBGQspGh0FPn6GkKO+9uE3/10Mz4GpJkQ3/vrrgPigz81PfixscTn9aMqNYp+1InzvAC3+OUTK+3rkgmSQ39Cjtn0jdhrfX7PhEPWO2DZSB7/Y3VRnkV2RWDA7r2aDdxhfnlpNAIYaK3H4HtXUje7DjV6p5s5a60guI0iWx+RnCVX2TWcJubFaVNZ3JEjhVzJCjYUy5SnZl/RaHF8WeAtSXK3YQn6G0D7Y8lyq2zSJZ0MkRJCGTtojLvr3IgwkJS6TlJ7D1LhZeS/dgFfqrkywAt+EIBcDHXGButRj+VnV6OA03xmzPG47yWMvwgy38KFKCqo5QelXsbs87cBUOwK06rV/ZDWNtbdK3iYZ1oB+1dDu/kMpaVfLx8iUIhmhJxNQA0KlBTl+WY/yB5HEIQBfc6fLIYP0w4CDZLfYPbCiX2SLCySH2PSZaA9Ab4J3r5o4V4E+9P0bhCLgbY6N8LhfUtCp8ZrLvOTKXrG6wql0u0zM+ukp20RQl6PVRob1hkOcSAOVV8a/HTCtv3oLZydpwi+x4 aHlVkX1n 83eXcQLiyaQPF+TjgbrFUn2eXoh6QiKYECzRIutby0XdLdUNCv1pDy2q7Wl61SS6BIHRM2oUS98HFRGZ6K51mnac6+l77hEOItMsAzWXhBtUtBgh8Uzv0FJSpQIFMS0h7+qS2m+6brirw3jUhdQKAeGB9oYq3Q+XzROR4wI03MXZfytJo6xvASej93vSIcAOeh245ZwQJUnVZrKT92u8cxNHgOsCUKO7P87Q/ 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
memblock: clenup
|
expand
|
diff --git a/mm/memblock.c b/mm/memblock.c index 9b4fa8fea9a2..3f142c787491 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -759,7 +759,7 @@ bool __init_memblock memblock_validate_numa_coverage(unsigned long threshold_byt /* calculate lose page */ for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, &nid) { - if (nid == NUMA_NO_NODE) + if (nid == MAX_NUMNODES || nid == NUMA_NO_NODE) nr_pages += end_pfn - start_pfn; }
On x86, the call flow looks like this: numa_init() memblock_set_node(..., MAX_NUMNODES) numa_register_memblks() memblock_validate_numa_coverage() If there is a hole, the nid for this region would stay to be MAX_NUMNODES. Then memblock_validate_numa_coverage() will miss to report it. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> --- mm/memblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)