Message ID | 20220928223301.375229-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 3A774C6FA82 for <linux-mm@archiver.kernel.org>; Wed, 28 Sep 2022 22:33:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8E7976B0074; Wed, 28 Sep 2022 18:33:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 898076B0075; Wed, 28 Sep 2022 18:33:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 70F596B0078; Wed, 28 Sep 2022 18:33:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 626446B0074 for <linux-mm@kvack.org>; Wed, 28 Sep 2022 18:33:48 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 36E3D1C6AB0 for <linux-mm@kvack.org>; Wed, 28 Sep 2022 22:33:48 +0000 (UTC) X-FDA: 79962947736.19.01C7309 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by imf05.hostedemail.com (Postfix) with ESMTP id DEC48100008 for <linux-mm@kvack.org>; Wed, 28 Sep 2022 22:33:47 +0000 (UTC) Received: by mail-qt1-f179.google.com with SMTP id r20so8849421qtn.12 for <linux-mm@kvack.org>; Wed, 28 Sep 2022 15:33:47 -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=WAksJPCtovML0PXfuV6MvtFhaquK0tq65BQzPSMUX0EZb3CqP+duiDKDvHl3Sit7m7 7aOY0PEle5W8Mi2h7QigBTY8Lg9rVOpp48AzS1DIJ4l7/+09QqhqnWAx1czOCbInzF8d x0YJ/P2gInkW3C6VhvjtTXDTumcsev/S/pTT+ignxMH0mOrEue1fBAf5GE5WDzaQFzF0 RdlNkUbc/JOrJS4Z1j8l16rMuCAMgQ8Ox/Jf5BztPHKu7DNY6R4apLKF8tfNNMjx27+d 3I23mrMNzl+yyZHs1Odm+efLgckSB2i6WXUlZx+oBQ50hBKajiK77oTPrOY+jVboWfch SIFA== 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=FQ94sjOLw+CxFUGcAOMOslZcxZcIRNeJt6px5eRca8v1lzuyAg4lcajt1MzaHdgpM2 0Un3syuOA8/U2jsWt8DBJiueuMC62o9EkriuoYrztdVpWwnG/yY+Sy6AzTtixKTzqPPB rLKnLBkLDW39w7b/J1Zbdcx82RGNo67raq+W6+lprbJ9LM2htc8cZS/aRxvf1G13ePnc IS3Jzf+M7iLIIm0jpY7cqDtSTTA0/k7BXLfIc6dRBfJ/BuJv7voXPrM+hps13/VPPKrK qefGYxhOVc6pj9bbtKqE5HSbwY1xW14XfzvRxTRxZepGjNkPx/nQ2Qt3mL9JN6nprSxb acAw== X-Gm-Message-State: ACrzQf2DfSmnCKc1zPNZHIvI0kR1191RG1wC88wiPWIAQaFmoAFF03rv Ty5WjtDHAcMEeWl47UMQQB0= X-Google-Smtp-Source: AMsMyM5iPvaKGQ+lU/wA15lUDKduPyVp0Psny3VAxI8TVl+GMPXgPk02cHgarNIBuaXdamZhkM7iCg== X-Received: by 2002:ac8:7f93:0:b0:35b:bbdd:5699 with SMTP id z19-20020ac87f93000000b0035bbbdd5699mr78529qtj.46.1664404427112; Wed, 28 Sep 2022 15:33:47 -0700 (PDT) Received: from stbirv-lnx-3.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j188-20020a37b9c5000000b006bb83c2be40sm3963481qkf.59.2022.09.28.15.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 15:33:46 -0700 (PDT) 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>, Neeraj Upadhyay <quic_neeraju@quicinc.com>, Randy Dunlap <rdunlap@infradead.org>, Damien Le Moal <damien.lemoal@opensource.wdc.com>, Muchun Song <songmuchun@bytedance.com>, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>, Mel Gorman <mgorman@suse.de>, Mike Kravetz <mike.kravetz@oracle.com>, Florian Fainelli <f.fainelli@gmail.com>, David Hildenbrand <david@redhat.com>, Oscar Salvador <osalvador@suse.de>, Michal Hocko <mhocko@suse.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Doug Berger <opendmb@gmail.com> Subject: [PATCH v2 1/9] lib/show_mem.c: display MovableOnly Date: Wed, 28 Sep 2022 15:32:53 -0700 Message-Id: <20220928223301.375229-2-opendmb@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220928223301.375229-1-opendmb@gmail.com> References: <20220928223301.375229-1-opendmb@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WAksJPCt; spf=pass (imf05.hostedemail.com: domain of opendmb@gmail.com designates 209.85.160.179 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=1664404427; a=rsa-sha256; cv=none; b=7eZgoUGcM/7ydk9MDf7aV5KLk65eMvyvQ+w+e66qEDZJ06gaDXUTeEJi2sNlQyWMJw7J9f dMSuJDy1hZi4HJbODITAK46FG5cnxhGIUKtXABO8E1UPiOyPP8QhpxO8mPaAaHRdPqdXoZ PFQXN/TwMDBXv4shb99kLt6rrqfe9YY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664404427; 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=7aRNMevb/cx3cIcXKTQC7VAGYYDAKLE5l51LP5KW3E8WXOBvVJ+d3m7vLa/j+p5WTQ5beb sHbi9WnILFjCtTxSRi0AJnqI36aKWrg7zSirFnjKTAMogLuq/Thy2gOaM4Kb2HKDJe9InS lMlTAPhzkD8fWxNZycRtL45XxKaSlVo= Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WAksJPCt; spf=pass (imf05.hostedemail.com: domain of opendmb@gmail.com designates 209.85.160.179 as permitted sender) smtp.mailfrom=opendmb@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Stat-Signature: zziubn7g711kyceduw6n81bi3jt4nxa4 X-Rspamd-Queue-Id: DEC48100008 X-Rspamd-Server: rspam05 X-HE-Tag: 1664404427-463110 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(-)