Message ID | 20220913195508.3511038-8-opendmb@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 31C69C54EE9 for <linux-mm@archiver.kernel.org>; Tue, 13 Sep 2022 19:58:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BD3C56B0083; Tue, 13 Sep 2022 15:58:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B83196B0085; Tue, 13 Sep 2022 15:58:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B1F18D0001; Tue, 13 Sep 2022 15:58:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 8C98F6B0083 for <linux-mm@kvack.org>; Tue, 13 Sep 2022 15:58:21 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6D798A66C8 for <linux-mm@kvack.org>; Tue, 13 Sep 2022 19:58:21 +0000 (UTC) X-FDA: 79908123960.24.948673B Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by imf23.hostedemail.com (Postfix) with ESMTP id 1C2691400B5 for <linux-mm@kvack.org>; Tue, 13 Sep 2022 19:58:20 +0000 (UTC) Received: by mail-qv1-f50.google.com with SMTP id s13so10080186qvq.10 for <linux-mm@kvack.org>; Tue, 13 Sep 2022 12:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=hB/8CHaP3epa66ZDI7eIxcYHinx9lai7E+SzdR8JK34=; b=DH5wOpdpiHaFFXY8TAT3JRecX64XiPNxiR/CcG1LrVu07Readvn0PWViKgBmDA60Pb UBITk9aWlYro2ikNI4WmLJPOCXwQOqtprdUB0CzoJZ72kknTQx9o/RitCRSffQDxQ5Q6 VTZyKVoIHd28mrFZHIQl9dz1uLmu560sdtEcQWDtP1q9dt0hIGQCuqCTjE9fttuhjONt 0HIT34gX8eS66xaVSIttBxYAN/YQSf5UtfsLj6aZ6r0xFgT3C7geS9uBf8xzXOro8Ch1 QuB8O5yFa+P3URJ5XpTXammfwNsUv1UpGQMU/vjO4KV44uIZqk+ZBhqofvaHP1BLFOQP ilEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=hB/8CHaP3epa66ZDI7eIxcYHinx9lai7E+SzdR8JK34=; b=wd47I37gojnsKsogfl1ScK5sVUse+XfgxrBQPR0rTgMDBxlSknIj041mfy4kxyGc5c 0HWkzWbNRsQ/iFsmYiYNFFVKulXBsAnDJqhIdDuyahfs0hWGQ5kQF0gXJIf5ZXzkqRld 7XS7rln6yaofC1TwF4R755ar3MnWi1ixJJPlCLjuGaME9ZTeYPBPCdpvgAarX7lZdhyT QFD453lIc8pjK/nFVP8Ktd144v3jqZztVW/3GeX6lf96+D/WTr9CU0bk2pu4bdcpPtiI uVOkEiHPy6W3zI1XpZ1qmEFPZ0zbMNH0V42H6TJeU6M3AudloariqR52wsFNphLx824F 66fg== X-Gm-Message-State: ACgBeo2Fog26OF3nbHYJZxDB7KRldK+y4TeF5dBugAn5bRpgQY3LgUVX 15A0v6duGI0sAEjyzF6Mlik= X-Google-Smtp-Source: AA6agR4VzptNv0IdYnihlFGaNyhbElSt3SCLpuN9uI3qoIO24r77G7BDUS/ieSa0RDNa+EBnGiO84g== X-Received: by 2002:a0c:c98a:0:b0:4ac:9f4b:efed with SMTP id b10-20020a0cc98a000000b004ac9f4befedmr14045129qvk.35.1663099100395; Tue, 13 Sep 2022 12:58:20 -0700 (PDT) Received: from stbirv-lnx-3.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id s11-20020a05620a29cb00b006b8e049cf08sm276305qkp.2.2022.09.13.12.58.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 12:58:19 -0700 (PDT) From: Doug Berger <opendmb@gmail.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Jonathan Corbet <corbet@lwn.net>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Frank Rowand <frowand.list@gmail.com>, Mike Kravetz <mike.kravetz@oracle.com>, Muchun Song <songmuchun@bytedance.com>, Mike Rapoport <rppt@kernel.org>, Christoph Hellwig <hch@lst.de>, Marek Szyprowski <m.szyprowski@samsung.com>, Robin Murphy <robin.murphy@arm.com>, Borislav Petkov <bp@suse.de>, "Paul E. McKenney" <paulmck@kernel.org>, Neeraj Upadhyay <quic_neeraju@quicinc.com>, Randy Dunlap <rdunlap@infradead.org>, Damien Le Moal <damien.lemoal@opensource.wdc.com>, Doug Berger <opendmb@gmail.com>, Florian Fainelli <f.fainelli@gmail.com>, David Hildenbrand <david@redhat.com>, Zi Yan <ziy@nvidia.com>, Oscar Salvador <osalvador@suse.de>, Hari Bathini <hbathini@linux.ibm.com>, Kees Cook <keescook@chromium.org>, - <devicetree-spec@vger.kernel.org>, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>, Mel Gorman <mgorman@suse.de>, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux.dev Subject: [PATCH 07/21] lib/show_mem.c: display MovableOnly Date: Tue, 13 Sep 2022 12:54:54 -0700 Message-Id: <20220913195508.3511038-8-opendmb@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220913195508.3511038-1-opendmb@gmail.com> References: <20220913195508.3511038-1-opendmb@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=DH5wOpdp; spf=pass (imf23.hostedemail.com: domain of opendmb@gmail.com designates 209.85.219.50 as permitted sender) smtp.mailfrom=opendmb@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663099101; a=rsa-sha256; cv=none; b=17R68LQ+p2upqsusnvqBt+aoLoiZ0TLsS9C2jNa7vHZBBZoGn4fXgycLFHk7HftDhZUH8D QqOp+HnxPQgT2AZkXxHQJx8qVix0SeTMBoDsxpUbL6lXvmxRR13Lbf7ep/ydB93PkhlTpN jvWfpThefqnTpcBxM5WX24feJRnKvjE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663099101; 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=hB/8CHaP3epa66ZDI7eIxcYHinx9lai7E+SzdR8JK34=; b=xQYb7wtY4rJsBmSGV50z3/mK2IeY1jCw21hVtQzLLZaNBT8XhuQb8ImXweMn34NQW/Hbul ayL1AQs+PDNJxQjpW3eA+SjOOMzxeQ61P1e+Vwf/cZ5VdeBU+t96sityYYRrNEUI+VRO3h 29rxtPr5H5CEK8UxQUVhKa9C9dW2EEw= Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=DH5wOpdp; spf=pass (imf23.hostedemail.com: domain of opendmb@gmail.com designates 209.85.219.50 as permitted sender) smtp.mailfrom=opendmb@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam12 X-Stat-Signature: ar1udrnky87iqn6h4jdyidyh7jz1dhex X-Rspamd-Queue-Id: 1C2691400B5 X-Rspam-User: X-HE-Tag: 1663099100-405339 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> |
Series |
mm: introduce Designated Movable Blocks
|
expand
|
diff --git a/lib/show_mem.c b/lib/show_mem.c index 1c26c14ffbb9..337c870a5e59 100644 --- a/lib/show_mem.c +++ b/lib/show_mem.c @@ -27,7 +27,7 @@ void show_mem(unsigned int filter, nodemask_t *nodemask) total += zone->present_pages; reserved += zone->present_pages - zone_managed_pages(zone); - if (is_highmem_idx(zoneid)) + if (zoneid == ZONE_MOVABLE || is_highmem_idx(zoneid)) highmem += zone->present_pages; } }
The comment for commit c78e93630d15 ("mm: do not walk all of system memory during show_mem") indicates it "also corrects the reporting of HighMem as HighMem/MovableOnly as ZONE_MOVABLE has similar problems to HighMem with respect to lowmem/highmem exhaustion." Presuming the similar problems are with regard to the general exclusion of kernel allocations from either zone, I believe it makes sense to include all ZONE_MOVABLE memory even on systems without HighMem. To the extent that this was the intent of the original commit I have included a "Fixes" tag, but it seems unnecessary to submit to linux-stable. Fixes: c78e93630d15 ("mm: do not walk all of system memory during show_mem") Signed-off-by: Doug Berger <opendmb@gmail.com> --- lib/show_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)