From patchwork Wed Oct 30 08:37:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: MengEn Sun X-Patchwork-Id: 13856120 Return-Path: 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 5A268D7497D for ; Wed, 30 Oct 2024 08:37:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DB9D28D0009; Wed, 30 Oct 2024 04:37:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D6A928D0007; Wed, 30 Oct 2024 04:37:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C305F8D0009; Wed, 30 Oct 2024 04:37:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A3F4F8D0007 for ; Wed, 30 Oct 2024 04:37:43 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 1FF8F40A8E for ; Wed, 30 Oct 2024 08:37:43 +0000 (UTC) X-FDA: 82729614954.29.3F45F71 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by imf08.hostedemail.com (Postfix) with ESMTP id 5F22A160026 for ; Wed, 30 Oct 2024 08:37:24 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CZnT8iMm; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf08.hostedemail.com: domain of mengensun88@gmail.com designates 209.85.210.178 as permitted sender) smtp.mailfrom=mengensun88@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730277285; 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:references:dkim-signature; bh=pK1NNN5iiYcr55Jg1jQR6cz7ApTsH5+EN3pM76pGsi4=; b=0H5soRpZ6GGzRktB4KqSlpTzTvVXmdyRnHRk8+Fd3P516Os7jAjNl9g11/8u/iR+4w/DcV qq9F8Tpg0BxfKopwXxe9pv4dKoEX2Xp5xTY1SkF0HlorKCQDQTSxOnrfiD5xG1FFyKoXto bwkx3EvXlnd+2cWNkpVkijUG1+CpurU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730277285; a=rsa-sha256; cv=none; b=dxV4RdemrIyyhm/jwHr+UhKSOFuSB2NujTPqtSv6DwoU7W6hXsSOhRgpbipYz6Kr5pLvmh MHt19+otW31Uzj5MUxZIchHEdJtHUqafllffZTl+KFVact5YRRNXjpcr575auxK2hlpTQS 6Lo4ZxidSsnxfZhqquc5tJZZUmUZBs4= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CZnT8iMm; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf08.hostedemail.com: domain of mengensun88@gmail.com designates 209.85.210.178 as permitted sender) smtp.mailfrom=mengensun88@gmail.com Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-71e61b47c6cso5190301b3a.2 for ; Wed, 30 Oct 2024 01:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730277460; x=1730882260; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pK1NNN5iiYcr55Jg1jQR6cz7ApTsH5+EN3pM76pGsi4=; b=CZnT8iMmUsUUpuJ78ksZCCx2kLNaKQsg6PSBP8K50C7Ae60R2tYTwmvdHsvdaB6XyR qh0yXWeMiexYH2380GPP/c+LcZz141if5b40S1h2eZbBr4ct68052KvDzPnmB0pWbjry qpL8ZbBVM3NpmgYPr3gVIaxoF6IjDnp8SDrJGrgcPTSY44jKlY6ihRC+70xJfq3yq7xv W1IClbeUNTv69oEB22/P6G2ueNu4QGG7oIBekCUFnoXZw5UT++Cw9OoqOSuHJqdIDnBK Q2H4E/RJ4OMaBx0HM+sUzlNDUihGGf2TWI8ZvgDgU4JXQ1LYhCZ946X39AZuVXXbgUIF UGVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730277460; x=1730882260; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pK1NNN5iiYcr55Jg1jQR6cz7ApTsH5+EN3pM76pGsi4=; b=X55t3YNTxDDwQ2q92N1smmbm2Z+MRvJwsO8UKMp1lOpNXARdlH2PZqin72cnFy10Os 6ZCsDRxDffRt9PTbM9c8477keEo99qZ8XBztez3baon1yPy3Xo2eFBJn6oEL8TyA9L/+ F/QQOZZHyRsAyBr7I0U1MhY+ymEivVxdqvODcEtJH5c2P1uj7HqvPbSttlsJosKPO4SZ wdEW0+9xzS3rzX6Fo9M7juat+7KUKheyCbkYW6/+qq1gXT4lqBrz36JX+YL0Zg+bwi8V 4fa2GHc/I8ourHiU5racZaR+aBVtpN2Kk9Btp/9dR+ey9x+62bQX4m9VAF7uQ8RIw/Ib 8vgQ== X-Gm-Message-State: AOJu0YwRo5YpcCtM6Mv1EDI2KtaerOJQe3xpWacXysUOjwwox9TWibkU 5knaUujXYNmRmQvyBUsQ7wwDlwra93MlLvUaK4lwmLd9vC1JgZra X-Google-Smtp-Source: AGHT+IH27fGPifl/S1VUCnhapo2Uf3UleHjwcju3joeUSQOWLZvC9JFY4Xl/GePrl2GOWwNrtifMvA== X-Received: by 2002:a05:6a20:d528:b0:1d6:fb3e:78cf with SMTP id adf61e73a8af0-1d9a8506d92mr16954661637.41.1730277460124; Wed, 30 Oct 2024 01:37:40 -0700 (PDT) Received: from localhost.localdomain ([43.153.70.29]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e92fbfb05asm1081901a91.48.2024.10.30.01.37.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2024 01:37:39 -0700 (PDT) From: mengensun88@gmail.com X-Google-Original-From: mengensun@tencent.com To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, alexjlzheng@tencent.com, MengEn Sun Subject: [PATCH] vmstat: call fold_vm_zone_numa_events() before show per zone NUMA event Date: Wed, 30 Oct 2024 16:37:37 +0800 Message-Id: <1730277457-22725-1-git-send-email-mengensun@tencent.com> X-Mailer: git-send-email 1.8.3.1 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 5F22A160026 X-Stat-Signature: x9838p88ko4pwihufgminw3ob6budph9 X-Rspam-User: X-HE-Tag: 1730277444-549713 X-HE-Meta: U2FsdGVkX19o5KvGJsfhR9qgBEMxMY5j+gaqkoTNDM0rsdx+Xd6yJ++0VzoNhQOhttFeAhS0dY0QybTfqwAPfnPTm2wu/ATEA7acOsTnJXiqaWNPOWVM05GwzIkhR+Ml453EWt3Iz72YWOYQlgkXe+xz4fEmGGMgHuEpxYHgyCpVQvSxccnAyic16jnL0TyvmCuyDj2KwFZWPNhqlJQij4O7w4HiXKt3Vs57VSkE/5vSvC+in4LQG6iJasRp7i0mAj3DOA+RFLs0xCqkVcYv9WBnsQGLs7yk2od7mlJ5xFk8za6L7pVoYBZMxg2I0FOCsnIol7wS6FKoj9DU/tGQxIKeXUGHVUb1olfcHrDhW/G0wX12YCgOV1CD31X2jx+JuettpK7SoqEFZpqAwqHqNCrbjKkUDzd0gk8EXwliGYZt4J0oElURRxOBJLx5IZqZRf9UqWxEQnP0z5Gy3VV3D9vnuQtJN8LpMsVQFoz4/BhIsNC19xG0Q+zPAUxzAV1/egHzq8+gbu/sjEhubvpTTiz+Dibk1mRSCsqnefLqxKtwMdctTIinEQNaZLUhlXam95IpcoREsPjJBGt3aG9U6zXG5v+WsuTcwPb7d2nPF8oTEtKGy79Ja5CgmZMtp8NSRNjhyT9Zq2S2ib76r0h32/97SBWLzyoSUKNBTiTHoKfveeo9Jcq7kNqrlDEeu9EYTY5QAnaFciOzn3I8TN2U1klzM/V+2/uZJ4LJy7GIliEmNlU5MVF1vVh+Tyamndpb2bL/HXqKHzYTaJUjN+ij+P9s+mrJcXUqV9CFwwuc1RHkTuqCfVCnLGa8mNAy1+65+nBPosyBJ43OHREWODeTWjz0oCJ94t3kICguE7YtxCJrFMLfj1Q3fBsvJQLAsfevmUIXYjAZKaB/M9oafv9mAtR6MDuWyyKvDgvpJNwOBFHY0V++Og2X50OLsvvbVt0SsvGhMXr4V6MOotqiW/y MDgmo5PE qvntGXLUHfjG3BDEuLDXeQnDeWj6ff5VhL/b9G3YkLB9HLtHVPZiwYx2XgFXYPBxiyMt7Eh1xFFZUFM1vBsFFNU8kQw9MFoJGlQ3o8qZ2qK9B8VRI5DfGl9WRT0YzbeNXza0A9IZyDk6SiwOjel/qTl/6zDH+Poku7EidDta4LKnGKpNMxD8A+YoHr6/unyQam8ONSWGIa5XNP93N7mA2UiRmQueOBw7LbfdiUQLfFjW2bWTj//cNLWJIhZt9SHkOq2JhGt5vHn0AEgm6Skk0sPYla9lyeC2s71xEa1QwJnmlEDSEFya5QjHkmx+SX+35Eg9hXxySBvpZ/GVglHy6yGH9ZA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000010, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: MengEn Sun NUMA events will only be folded from per-CPU statistics to per zone and global statistics when the user actually needs it. So, we perform this folding when reading the /proc/zoneinfo Fixes: f19298b9516c ("mm/vmstat: convert NUMA statistics to basic NUMA counters") Reviewed-by: JinLiang Zheng Signed-off-by: MengEn Sun --- mm/vmstat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/vmstat.c b/mm/vmstat.c index b5a4cea..2770800 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1778,6 +1778,7 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat, zone_page_state(zone, i)); #ifdef CONFIG_NUMA + fold_vm_zone_numa_events(zone); for (i = 0; i < NR_VM_NUMA_EVENT_ITEMS; i++) seq_printf(m, "\n %-12s %lu", numa_stat_name(i), zone_numa_event_state(zone, i));