Message ID | 20230311003855.645684-2-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 0CB94C6FD1F for <linux-mm@archiver.kernel.org>; Sat, 11 Mar 2023 00:39:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 879708E0002; Fri, 10 Mar 2023 19:39:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 828AB6B0074; Fri, 10 Mar 2023 19:39:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6CA048E0002; Fri, 10 Mar 2023 19:39:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 5B68D6B0072 for <linux-mm@kvack.org>; Fri, 10 Mar 2023 19:39:50 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2F28E403BE for <linux-mm@kvack.org>; Sat, 11 Mar 2023 00:39:50 +0000 (UTC) X-FDA: 80554759740.23.EA47C4F Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by imf23.hostedemail.com (Postfix) with ESMTP id 5875A14000E for <linux-mm@kvack.org>; Sat, 11 Mar 2023 00:39:48 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Nf4Q5bno; spf=pass (imf23.hostedemail.com: domain of opendmb@gmail.com designates 209.85.160.177 as permitted sender) smtp.mailfrom=opendmb@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=1678495188; 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=rkrJtBKgdz9IacsmBdIB0+uEq5L3ahKPJNy4SS1btTU=; b=tDZP3q5bOKZlvvUXzPZbP+35YtLTf73Z5GtvUZu3muug0faMr+77ehezLVY51Cq/gdPGEA hd4HTYdg/8Q2nq00JFCLiJ0dr2+YL+IK3WxB3fRCEUXxqFsJFmkO4CAS9iIdHnl6K6Abs1 KqUcHYhv2J11uRdIz98k3Ik3ruCNRLg= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Nf4Q5bno; spf=pass (imf23.hostedemail.com: domain of opendmb@gmail.com designates 209.85.160.177 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=1678495188; a=rsa-sha256; cv=none; b=xS+YhGgc9FqhVNjUnHglbQUgkTadZ2w1VBqmXpbKyl2WgxeHiBFZKIcrcysVc/K6sHr1Ma r15nTe/ZeF6WZ3qeKRDfClQDKFF2pb20ENcHQ7D773cpERZmhc2OREm+O9lMFEe6lYQNDy DjqEKADAqCfAOdfiyMdTjF2Cl+cX1uQ= Received: by mail-qt1-f177.google.com with SMTP id d7so7672658qtr.12 for <linux-mm@kvack.org>; Fri, 10 Mar 2023 16:39:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678495187; 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=rkrJtBKgdz9IacsmBdIB0+uEq5L3ahKPJNy4SS1btTU=; b=Nf4Q5bnoJ84mo6BVRKtM3OfYWI13uwKOw3uMc7wGcqg/YFrF0EDMb2Tc70a6r1fzZc Vir55wXtNRFzDTHoKksEBE1mT4Whc3rUCB6/a0qYsGVSTiZtZ1TEhI9YVuoSUTQOWpIZ wkyLW5TGMgj2c/+6vz/qhI3xMN7MdJyqYQkUUjkArXHvmslWI6L/Xb589+yt2NqJ62aO kbpLaP4c6yERZu1yQsMLtGpH/zEzYZeuNWWDxxsC3FvHSaQbKpvi5zFCrlyV+6tabjRH vcZbcVon48Fjz/56NthcczU09cWdHbhFtoufMuJ6CShKWnTHB9IBjP7QRZcPwiJtc50q dKRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678495187; 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=rkrJtBKgdz9IacsmBdIB0+uEq5L3ahKPJNy4SS1btTU=; b=YHwrmDRsQceGjdQdG6U9iT4vy3cNwDTLi5yi13BAizxhr42X0deI4DdZQbnSVTxYV6 ki92mZnrfcpzRZq2kJcRzIX2Res++t0bJjtUvn+ZOvoKqMY+vLCPKY0tTILSSug2Ak+P tA46RqhK1MXLIuk792sME3j8rOarbpM9Bq+x/VJN7ty8qU7oX0dhEH/xe4apdmtA+ckF ZdMfqFuDSq0GaAg3/b0ZgcOTE3oyaW8HPp5gDYuNlruBx9xzZK+OJB93iq4WFtrmph4O K971rDqdbhVqZwDizKuzKTrxy9AcWCM4XePbLZOlsGAJSdD3YdwJJCVMd9l39yZFL1lz gNlg== X-Gm-Message-State: AO0yUKVDvcX6vYXz4ALql0L+R4B0BbW7NZSKeKOsgIPvS/k10wDAjXMu P3NGQsQBu966WvWlNs4tsXs= X-Google-Smtp-Source: AK7set/Bpp6yGdrFeMDx50dFU90Wr4xltqSMpKJQRscRiht85efTCEQ33g7uJ6Dpxtrzuwm9BJqBkA== X-Received: by 2002:a05:622a:244:b0:3bd:1bbc:8d8e with SMTP id c4-20020a05622a024400b003bd1bbc8d8emr10459853qtx.0.1678495187484; Fri, 10 Mar 2023 16:39:47 -0800 (PST) Received: from stbirv-lnx-1.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id a5-20020ac84345000000b003bfaff2a6b9sm868874qtn.10.2023.03.10.16.39.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 16:39:47 -0800 (PST) From: Doug Berger <opendmb@gmail.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Jonathan Corbet <corbet@lwn.net>, Mike Rapoport <rppt@kernel.org>, Borislav Petkov <bp@suse.de>, "Paul E. McKenney" <paulmck@kernel.org>, Randy Dunlap <rdunlap@infradead.org>, Neeraj Upadhyay <quic_neeraju@quicinc.com>, Damien Le Moal <damien.lemoal@opensource.wdc.com>, Kim Phillips <kim.phillips@amd.com>, "Steven Rostedt (Google)" <rostedt@goodmis.org>, Michal Hocko <mhocko@suse.com>, Johannes Weiner <hannes@cmpxchg.org>, Vlastimil Babka <vbabka@suse.cz>, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>, Mel Gorman <mgorman@suse.de>, Muchun Song <songmuchun@bytedance.com>, Mike Kravetz <mike.kravetz@oracle.com>, Florian Fainelli <f.fainelli@gmail.com>, David Hildenbrand <david@redhat.com>, Oscar Salvador <osalvador@suse.de>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Sukadev Bhattiprolu <quic_sukadev@quicinc.com>, Rik van Riel <riel@surriel.com>, Roman Gushchin <guro@fb.com>, Minchan Kim <minchan@kernel.org>, Chris Goldsworthy <quic_cgoldswo@quicinc.com>, "Georgi Djakov" <quic_c_gdjako@quicinc.com>, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Doug Berger <opendmb@gmail.com> Subject: [PATCH v4 1/9] lib/show_mem.c: display MovableOnly Date: Fri, 10 Mar 2023 16:38:47 -0800 Message-Id: <20230311003855.645684-2-opendmb@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230311003855.645684-1-opendmb@gmail.com> References: <20230311003855.645684-1-opendmb@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5875A14000E X-Stat-Signature: n11x1n6z57xbsocahhp9wmp5d656wyzn X-Rspam-User: X-HE-Tag: 1678495188-285413 X-HE-Meta: U2FsdGVkX19hvb7e7xVq3mTjH57vciaULlFn4XPa/VPh6zsxQStHY9A/ZoiqwpvBIqsR2hLdaXveyAH0E3a7LwwIVrZbv4QmQ1fAc1QNB0Oc/2spu2a1IrcmcgFLTm6tB7058w9xKbAGGBEo2ZR6dWTKsBZVbzL+GAwqqf5HqOrhiUqd3KdfVKjeoxpSwdUTwWI1beZFQjIn6utK4+S+rADfo0+K05FwUqRwAtMZTzd9+zM2wrNKhXq6p9WfswjcvhL2bYN616a15vvcrYBMQPO7CE1e63HScofdRRIf1bCXtkTU1RjE+WBpgCwt8KKqpMzZeOFoAQVXfMBC9pc31X5JaFgO2t+Y7FHF85bT1JdX9o70PihZgYcL+Z+eCZ7gEUskUvCxMiAyuR0ZZOjVX5zBaCGbiEejhAhv9s3GYp5nt9NQxcgHVWcOzj8grM0QWP34o3eHi5Z4oS56AAecmVkbYTPGaFtQlEXmGvB+G124IA3IJL2r59eksIYBXAs4ZKtXBXnDPavQ/8lgyW0TblruEQnIQVtw5uzbQ2awoyDa8dRiH9Y3EQZEUc0ZTE2syavXmEm/v1kxvuIUU7C5HLZsKJfZIDnit6qjD/gM/KD6HVtBLyV3g6fWWlb7K4ZNvrEHNwvSAkKdko7JvlmshuQ2+Zbxfw/GFOS7MRsYVxaWgjq+YXUqcisgZMAGylAbn/Vdp6Wu+YADYqZtq+MOM6ZyBsjBifjbJ9004C6zNypyZjJaDNwO8Sf1axJTm+itENXb/WCXEssyQoqyYgZSnqNy+GpfexFygps3OhSVaxTi86fMf3LvuqAD5F36wGkIRb5RddrBC2nVLIqoBhVYfx3A10kRR3bmZxgXzBuG8Hj+8BE9sguEexDTKkdYdG8GvYSz0072UtAgHUOA+nD0tM24Gp+5XHqyupqedxB1OukQE4N6XxVL+YiuiC4Pmra1L3DvOLo7OrzDcGmc4xx /sGysu8I UuXSCAaQ6dv7/FEzrj6haGW+Fm6NTlsAq0NHYSC7mYteBMzOtkWcNC5ag+bj5nIKiDZmKl8o8B5qdq5Hitp5akrXGCj05XbnU2cUutRox1SerPJVBgeHLqgAPkC2pZrgVFsdZ2sdDQMyA/QiwRYjLFf8wDN95IcVk1flGTZy4BS8Nslvngsx1rdsa2RHYhnlOL/h0BqmwQSq0+7ztLXgE9gr7BJNPYTdPtwHJ+4xaX9JNFg8ff51jBl56XkP2XG27oBUZldEnTJ64i2PVYHbklc4k24IfhURX7WSOE03rfQ57TiwUTzM2zuPaKgeq/Kte9wZwnWJ3OJf7f/l7j6HpCfwyhq8dRSkpBDpQUeT4pZVnhqaYbEpxX1QmFM6dOHq+TSDFUyHwL/16x+pFrnuVZSE0gWaTI63QBQiK0z7DAo/XeIcMp+uDpehpkjFE91yPZ1dcO12FhdhJZY/jni2Z2DJ4EaNbGNXDWfHZdE1/Wzy+UgHR4BWOifeHYbSPIExOMzGtqah4xZM7/uITJKIbkCTwp01zOu9hFNE4+KpPEsjVdQE4yfGIycWn26i6K7RbknZAt88/3KBpHZI= 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 0d7585cde2a6..6a632b0c35c5 100644 --- a/lib/show_mem.c +++ b/lib/show_mem.c @@ -27,7 +27,7 @@ void __show_mem(unsigned int filter, nodemask_t *nodemask, int max_zone_idx) 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(-)