Message ID | 20250112161020.28021-1-jiwen7.qi@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 4F394E77188 for <linux-mm@archiver.kernel.org>; Sun, 12 Jan 2025 16:10:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D15036B0083; Sun, 12 Jan 2025 11:10:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CC3836B008C; Sun, 12 Jan 2025 11:10:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B8B866B0098; Sun, 12 Jan 2025 11:10:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 99A8D6B0083 for <linux-mm@kvack.org>; Sun, 12 Jan 2025 11:10:26 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B8865B1512 for <linux-mm@kvack.org>; Sun, 12 Jan 2025 16:10:25 +0000 (UTC) X-FDA: 82999287210.26.7D7DA12 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by imf19.hostedemail.com (Postfix) with ESMTP id DC8601A0006 for <linux-mm@kvack.org>; Sun, 12 Jan 2025 16:10:23 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Ed4Wj9ED; spf=pass (imf19.hostedemail.com: domain of jiwen7.qi@gmail.com designates 209.85.128.45 as permitted sender) smtp.mailfrom=jiwen7.qi@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=1736698224; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=HTE2fiN8ApW5FfKNGy2rCGaSV04WznI8sf+bEWysG9g=; b=Eg9pkX0hufbaL0trj0YEh/2UZdfTSQeQVwOfEWbZyhtlLj/qymb/WaeriLxC2wF1P4O9eG 0qZkp/D/UGVlqEBXkRj8nG067+nazgMSBHHaGlZbYUE0v8TBlEbxcUhxjYVbIaYBHVQ3Ch 0s35HMihRwnkS4ZxzAzz6kZyV6yu7bw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736698224; a=rsa-sha256; cv=none; b=ajbq2XCw6z2c9n9f4kqG9qkfOsyqgMNvJYoesrcaHaxMLCy3FsJiM8JUT2yOsjtq5m4sAD qp4+uwT/mIzbzSEU7PeI8TUbOvJ/q/+cgtbkK4Z0ke9IL0g+o1Gx1uh5uxlybPf1fYnhnG aJp1EFrzSJ1o6MYxEQIRa17PGXcjOSs= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Ed4Wj9ED; spf=pass (imf19.hostedemail.com: domain of jiwen7.qi@gmail.com designates 209.85.128.45 as permitted sender) smtp.mailfrom=jiwen7.qi@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4361dc6322fso24597675e9.3 for <linux-mm@kvack.org>; Sun, 12 Jan 2025 08:10:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736698222; x=1737303022; darn=kvack.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=HTE2fiN8ApW5FfKNGy2rCGaSV04WznI8sf+bEWysG9g=; b=Ed4Wj9EDyMKN6zPaZDaF/oBiswc1KuzIetGje1e5a/tLNahSSFeIjxGPhMul5vQzh4 nvUMM8bLHr9R4VR/gtgCxZAkGezVp3StzzQ7nZmIl3Yf4noQCwPL/Hy8HzfKnmMMvMT0 wNpkg1rHAjO8PX2c3Ap6K+eTl08x9UDAWzPSflL1xeFpBJc49Giie6/Mtgd0EZWK4Pvc 7q2Uv6UsFSovzZiXAP9YhyJFHEF2YwDOcSrWGVEx8NcqiZuKZ682e5ewLf0GAWH6UL6Z K78fZ2DvPkFNOdeF1NKra6TFe14UL9e2g66MkHz07EDPzFYMGV0SAyVmGSFzRmlYyJve XPcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736698222; x=1737303022; h=content-transfer-encoding:mime-version: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=HTE2fiN8ApW5FfKNGy2rCGaSV04WznI8sf+bEWysG9g=; b=jzqkw8Yq32jr3DODQy27T4rV/hcoT9apRTBvWXBCi7uc+8DBTVrMFGRPWOxXpn2ivJ V6gj4SYjaxkR643I8GWWbPTcHPHcbCL+ibUHZHLeFGWfIyPec5yVqmxTvvenl+x7FiNe OJHBCo/deZVgNtwwuQ7PGzTxN9/PWzsNngXz8Nh3NurcZDOLl+XUa8+Fahp5eVOPkxMO Yk5xJgTopKygynv2D3aCf1SqYqUNcddKRaaSc4DbHMjPirOIUgGFJrnFK7T2cpAOcQb8 bA3UErPjzBAokXz+M9+vPsOOhIMjX9BNfHKOe8JerdH5XfDA3PzN7Pbw/+/kAuN2iSNb mRBA== X-Gm-Message-State: AOJu0YyogjBdO9ZTIob9+Cw/WGR2zSrJqkJDH3eJLrH3ulDzhqalbRxR /4vtb+UVoB0UMIoSZB2MKq7ayyMiahEqfEv+YdTnzGK2LhZm0Kwk X-Gm-Gg: ASbGncuZ8iTryBBVOYz/HQBibuiDmzKE7NGWYaiKgJP4+NcnUBaYMrnqisb956h18kn shyg1zoa0/G7Kno8tT8/XCBP63Qdt0kYaZIsDeB0HE1vPmquj0+Sowl0u6wHNrNbWvXe5BfOeiQ lREg335GdjtzYhbWAV/VozalmXX/uV7RKuLXl91DcRjlymsVY5+a79P9sDHvuoYnLa1uR+556GX OYY2+HQV2TEyJzRJDwainkpaXRJU8wwIgC/HqobdtHQ3+SMW7S1F+j0KuRtQcQ1jLixKVNhLF+B XBid2plcyW7WhaZmfGmKCqDfQjS+5xA= X-Google-Smtp-Source: AGHT+IEVazAhJ6hqY8rol9XYlHCTzIBAb/8M9S7sPOPPPoEZiGTuNKIEFvhXIbS8QEFdg9pRnmNyuw== X-Received: by 2002:a05:600c:4455:b0:434:fbcd:1382 with SMTP id 5b1f17b1804b1-436e26a80b6mr176214445e9.11.1736698222245; Sun, 12 Jan 2025 08:10:22 -0800 (PST) Received: from localhost (cpc83567-brig19-2-0-cust951.3-3.cable.virginm.net. [86.9.27.184]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a96c61b53sm7356792f8f.43.2025.01.12.08.10.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2025 08:10:21 -0800 (PST) From: Jiwen Qi <jiwen7.qi@gmail.com> To: david@redhat.com Cc: linux-mm@kvack.org, rppt@kernel.org Subject: [PATCH v2] mm/mm_init: Fix the zone->managed_pages comment to match the code Date: Sun, 12 Jan 2025 16:10:20 +0000 Message-Id: <20250112161020.28021-1-jiwen7.qi@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <019308b6-8dbf-4f17-8979-714297f559d6@redhat.com> References: <019308b6-8dbf-4f17-8979-714297f559d6@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: DC8601A0006 X-Stat-Signature: fwsosrg3a7juyq6c6n41jpwu96rmtyhg X-Rspam-User: X-HE-Tag: 1736698223-806689 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XGlSTmPJpsSNTss8vhB6N9b7WWPy8ld3JxdVBTbNTgjWMbIpw3z7QYiqCAFEmHhT29iFUzAGqlubdT59Mwfgl7+pKyWvqrINSP7IMXzBcj89muV2zvHVanyjxqM2GclWsH5yyvF7TsCbTHC7qfiJZSnygoi0hOh1RSGxR88mPBA+G/Co5ZiPhgXhdNXdPeWTvAem3rFHEKmPzaqNvHjauPB2mKQldVMqZJPreR5MosfA9nnzU/AY76PTuzPz7+4zJ8oR4JqIuVvWjZKKbb+4B8HnYKCH7jJ1LuLJirneYv3XIy2YZg+2C6CnrZtcyu3Rlo5FrLC00lnDWyPap8f7Ph0hc5KeV6jmjBal4Hko+xPSpz8PH5uMf039u1xhIVYlsUQhdSm2DYj/tg2urxwNqa8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000413, 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 |
[v2] mm/mm_init: Fix the zone->managed_pages comment to match the code
|
expand
|
diff --git a/mm/mm_init.c b/mm/mm_init.c index 24b68b425afb..48a4f661db98 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -1567,8 +1567,9 @@ static void __init free_area_init_core(struct pglist_data *pgdat) unsigned long size = zone->spanned_pages; /* - * Initialize zone->managed_pages as 0 , it will be reset - * when memblock allocator frees pages into buddy system. + * Initialize zone->managed_pages to zone->present_pages as a first rough + * estimate. memblock_free_all() will reset zone->managed_pages to 0, and + * calculate the actual managed pages as they are freed to the buddy. */ zone_init_internals(zone, j, nid, zone->present_pages);
The invocation of zone_init_internals(zone, j, nid, zone->present_pages) initializes zone->managed_pages to zone->present_pages. zone->present_pages is not 0 when the zone is not empty. See commit 0ac5e785dcb797 ("mm/mm_init.c: remove meaningless calculation of zone->managed_pages in free_area_init_core()") for details. Signed-off-by: Jiwen Qi <jiwen7.qi@gmail.com> --- mm/mm_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) base-commit: 4bbf9020becbfd8fc2c3da790855b7042fad455b