From patchwork Thu Oct 10 12:09:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinliang Zheng X-Patchwork-Id: 13830022 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 064F5CF11D5 for ; Thu, 10 Oct 2024 12:10:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 886CC6B0085; Thu, 10 Oct 2024 08:10:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 835F76B0088; Thu, 10 Oct 2024 08:10:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D6DA6B0089; Thu, 10 Oct 2024 08:10:02 -0400 (EDT) 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 4F0576B0085 for ; Thu, 10 Oct 2024 08:10:02 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 6346A1C7663 for ; Thu, 10 Oct 2024 12:09:58 +0000 (UTC) X-FDA: 82657574202.22.3F2A4E8 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by imf03.hostedemail.com (Postfix) with ESMTP id 54ECC2000C for ; Thu, 10 Oct 2024 12:09:59 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kBYFJalq; spf=pass (imf03.hostedemail.com: domain of alexjlzheng@gmail.com designates 209.85.214.182 as permitted sender) smtp.mailfrom=alexjlzheng@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=1728562062; 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:references:dkim-signature; bh=4uToUyv1Tn3i0V8tUilohK5/CS3wyFdpI4TShRaX1RA=; b=l4gKHYj00HauudFmZL70eHgwNF4f/TTLhYLqj/gyUlm286qpjYuEADWzQJcWfhq15SnMI1 riqKrsq2LHOIUBroPuW/e/o2xxlc+GnOqrip1VFpjvTislU4kdv4QFSu7ayvnwZdINIFKv N2+FFcRYXwCkFgbR2is/OKyA5oYiAT4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728562062; a=rsa-sha256; cv=none; b=7Ju9iWC5wkdhAEBUubdlNhHxUp5qfIv1xCU4UcBwwU74pWgcaPr7IlSXyM+Hl2DaOpyllU NYlibQ9Ynu8ijPCiWvpOJRcY233JCZwglKA7vx4T8+AjN1bV42ZNTBc4I6fXEcsHmQAcGK 74bYlegx3eUROgTvDZScQZlyN3iksw4= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kBYFJalq; spf=pass (imf03.hostedemail.com: domain of alexjlzheng@gmail.com designates 209.85.214.182 as permitted sender) smtp.mailfrom=alexjlzheng@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-20b90984971so7713525ad.3 for ; Thu, 10 Oct 2024 05:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728562199; x=1729166999; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4uToUyv1Tn3i0V8tUilohK5/CS3wyFdpI4TShRaX1RA=; b=kBYFJalqcKXYinCm8rCJ/dzfvPzKCmvoCB5nYgJprnd2wuWk53fRDXdm0D6SaZeacr ESjQl/NQ7ScZcON/ucOili4FmoxMYctCeYE51AoECxqAv0fM16o31S+bxXnvPI5oaFOx QYlgyh7jGFaeQqvfdSXecfVli4V/sjcpLy/JpLFu6H3Li+algEYjbjCggZLqEeAuz8w+ KjttoSRQYB2u3R1Bold7dYQOsWuFdMChvS0ICYc0LhO/Cadop1rw/DB8Rv56Ya56qw/N vC9HmQgIGKH0BZBnNZzqhQKfuJ10TSpAw3k+j7kfKf9wv2vR02GJFEpYQ57ZIPr5DDLl Vtww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728562199; x=1729166999; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4uToUyv1Tn3i0V8tUilohK5/CS3wyFdpI4TShRaX1RA=; b=F/GQMR7p/lCsYgZoaGUaOlRE+gtOpnZOlEuyiW9AzjeaV6CWAv3dC5xE1pwLX9jsdo Oa7BTSJh73GJyK7UzWAq812Kudhyb1LCgpK3BU63z6ZEOlc8eGddk6WwbZfPlvC18xTx R3LKw9evODOhrx5yqhutzQ0srMBz+SiBZfnBqE1vjVBoguKlqWL/OxMgqBu3PGFvF1r8 5EYJ+n4tNvKJymgqsT9kuGRIe9GGc+2RdXfMqw3FR90R2g1t7jkJfLEkjMluUWcNL4yM eOQZ2Jb+c2fYkY6yJPIaL9aH3HqTtD8KBzgUrbH5PtdMhu+KtedG6kUEiLrk1v7ZoPL5 XXWA== X-Gm-Message-State: AOJu0Yygi+yzL/qgOTA6ps3DI6GDaCPTASi/erFB6WbieE3Z+xWtSEBm UniygRKXt0OcqOssrJdhQaA6x5YactFBJUH6JHKziAWJaAcCrKQu X-Google-Smtp-Source: AGHT+IFDS5d+AboBnYWrSLCBixB9EGeFpYM3d2sk/ej8q98MJc0L1bfKF0yDUsRBE9gbrVPmMXhaGQ== X-Received: by 2002:a17:902:fb04:b0:20b:707c:d688 with SMTP id d9443c01a7336-20c6371d8f4mr55024415ad.18.1728562198709; Thu, 10 Oct 2024 05:09:58 -0700 (PDT) Received: from localhost.localdomain ([14.22.11.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c8c2133besm8456115ad.211.2024.10.10.05.09.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 05:09:58 -0700 (PDT) From: alexjlzheng@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] mm: add pcp high_min high_max to proc zoneinfo Date: Thu, 10 Oct 2024 20:09:36 +0800 Message-Id: <20241010120935.656619-1-mengensun@tencent.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-Stat-Signature: pogjm1wnue5jus7o6ojj516rkw379wzo X-Rspamd-Queue-Id: 54ECC2000C X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1728562199-377885 X-HE-Meta: U2FsdGVkX1+lPyQbb3CAepcZVKfHEaHCaFahnC9HQxG8wv4fOLC0Hf/PKv/sIgJlL/3HkHliMiBXQncEzX2AsyB+qyEB8F+BRXn36mvdXlgqxXX9+ym5j5ofmuvuiFopHb30wInvu1+STTEJMc4tqORy20/eluYS2t36Z/M0xdKUZaOzzhcSw5iWiRm9wgm91FgYSzHsnD4gTnq6tfGUywVwsqwMTxCSP99kuiDTTpwuSCvlVeBcEzcQ9Bz9v+iEzU66m5MIobNtTiGYYkMkQc3onbD+gVF+ycucSEAF6EPC3jB9/7PJHoi+9jZBvPn0i5EhgjBBLE7HhiGplk0NySJtWIvP5yGzz69TNwb0Npu9YNkX+7RgUWtso6O40T8WYmYzgYgSObbgy7PEuCpW7pXk33tdj6tt3wmhi1Kdnf6z1UUfbdbhHO7uM3D4MqMyeNx/qotHSqT7/NlAVTyT+osp7ijWVYdtR1FUbN5zzIrl4aWW1QQF13Waw5CEPvuhIuEbs3wjCghL2B8DcxhyYsQ8N6Xi5aaJ/QrpfRN9tEJo7QF6kSR4c2NeGSco4fFN4w8yB8lQTlVj3k/rkrAySGJCrymzkzd9xLN9HCnKviCwexkP/w0ynu+ofgxKxvknNTVx7NrCGWel2pbAY8t3TRL4Sh3eR9oe6OH+RHYtUEjwE+KGLuAwuqLu5BCX0jre9sg924EPHLKthWmsPuhosNa4aNafcTkSfp1ZiOv2MqF8PZ2ytDE/HkmrCdZa1f3XKui/p3TiCgVV5G8FVRjd99z2tYjIINVuTB3XNsUkKnwruWx79ZhiCqW/ZP766lorMOLjEZ3frAr7h9NYy4qJdvHoKC/cyZupO+E3p80+a+jCHXd6eV/94iHmaN7zZFdJb7mFJjkAMTAf3dRua8A9MaDOOYNPCgMXN6DHXxZiybGtzJWRkeimi+lZTcxCtkG9vAFztya9UpeMMvKCxSP smlVvSYN qitk00FFJHa+ZDYK+aCUHp4Bks0QNwNGEXSI3p+wJOA+0+NEyS1BTAzjW5nbNMh0EgnzMzgMkOaOMQC4tyCmbIAbcJaPOpB6U9AvYUXyhHxl7+/nMqe7UELUUadKVmNqvIoblMR0/Dr6oa/RUXBGN4+JmCi3KJhIMVUbJI7MtEqDkjCjgC87d9LKzqK4T6f6UlmsXlPBON1q5cGUagDD2mQTxzaqwxJvofSuIpyzeatG+cpKEt++XAdZXbO/6jedevw69sbBvqzJhrKimNHvT5bvpF4zy/ai685qF8Jvr7pjik11J8uUX+lWLzlhl3sJmHtsK0taf/RunszXqg8SdPxA9wgP4RiHOGGvDm+3lASoXUf6ml4xlB7Q8uyfgzGOHUWeUyz871/N4Kj43Dq3afT51KQ== 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: List-Subscribe: List-Unsubscribe: From: MengEn Sun when we do not config percpu_pagelist_high_fraction the kernel compute the pcp high_min/max by itself, which may be not easy to tell the really high_min/max. we output the pcp high_min/max to the zoneinfo Reviewed-by: Jinliang Zheng Signed-off-by: MengEn Sun --- mm/vmstat.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mm/vmstat.c b/mm/vmstat.c index b5a4cea423e1..1917c034c045 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1791,13 +1791,17 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat, pcp = per_cpu_ptr(zone->per_cpu_pageset, i); seq_printf(m, "\n cpu: %i" - "\n count: %i" - "\n high: %i" - "\n batch: %i", + "\n count: %i" + "\n high: %i" + "\n batch: %i" + "\n high_min: %i" + "\n high_max: %i", i, pcp->count, pcp->high, - pcp->batch); + pcp->batch, + pcp->high_min, + pcp->high_max); #ifdef CONFIG_SMP pzstats = per_cpu_ptr(zone->per_cpu_zonestats, i); seq_printf(m, "\n vm stats threshold: %d",