From patchwork Fri Jun 28 13:07:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Yang X-Patchwork-Id: 13716109 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 078DDC2BD09 for ; Fri, 28 Jun 2024 13:09:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1CE8C6B0083; Fri, 28 Jun 2024 09:09:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 157AC6B0085; Fri, 28 Jun 2024 09:09:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F13346B0088; Fri, 28 Jun 2024 09:09:08 -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 D0EA96B0083 for ; Fri, 28 Jun 2024 09:09:08 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EECF3120294 for ; Fri, 28 Jun 2024 13:09:07 +0000 (UTC) X-FDA: 82280327934.07.F4F3575 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by imf28.hostedemail.com (Postfix) with ESMTP id 22913C0023 for ; Fri, 28 Jun 2024 13:09:05 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PeCHokB9; spf=pass (imf28.hostedemail.com: domain of ioworker0@gmail.com designates 209.85.210.182 as permitted sender) smtp.mailfrom=ioworker0@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=1719580122; 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=0Dqb/vcu87ssIaU9jLdX0yVciHLHBURYh4ogzTx4dk8=; b=Im3a3GWs8n6cv3cJ/Rnu/bynxUGPCKO4Bqx/eakDaozyDRaXMSX8QnQ86rL+VGOA9exbWE +ZRl9EzJSWDa6No+r5/hX75YYc2+6IXch3djXV0MNX/tM/3TT6TzwOL6MxEy12TMP9wyZe ZJ8MDKwBJUJcvzEL//0aZzl/9lsfAK0= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PeCHokB9; spf=pass (imf28.hostedemail.com: domain of ioworker0@gmail.com designates 209.85.210.182 as permitted sender) smtp.mailfrom=ioworker0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719580122; a=rsa-sha256; cv=none; b=bGLedD8GSZxIDzvJ06l+Xx6xDaiJNCZOlsQjbyyRSOmqtbP6JdQd9icw/Q2fDpF7LT7uv5 mRPr0Y9Qcy7RJquIKZuia644VoZDMM5VuZ13F62kX2ipcraVjLy5AiMP7vF7F+lSxvXGnV B7V2MxxHuKgm/r8bx6Dq7ZKqwD5sGIU= Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-7067435d376so447952b3a.0 for ; Fri, 28 Jun 2024 06:09:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719580145; x=1720184945; 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=0Dqb/vcu87ssIaU9jLdX0yVciHLHBURYh4ogzTx4dk8=; b=PeCHokB9m09R4nbXD7hmNnQtVfNUvl0URUQM3iKlNMUmh1rE0EAiwkIHXxg2Raq2Uy HyiOp9b0dXTDazyK3IPqaV+KlIaU9a+B6sULcKYCfw97ZGV7JVly/bU1E0nOSrrkUcQ8 RCbYHZ4bYsmYJUre4NH20gegOmJZ0m48Fbo9pgtRQv7yEniTVDTo4pGqlcrMau6BNu9m 5kOVzoWJ39ydE+4/85CjFf+NglrCalzMdzhvBqJTZRCN1uc4xPcEk7ARLz6NZdOgcc9m uA1WS8HxlRJI3jt3YTdV56IUEAHPdfyxEQQqW8H0UsjscDUePaIGbt8s8bd0RmMK02fa 4ijA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719580145; x=1720184945; 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=0Dqb/vcu87ssIaU9jLdX0yVciHLHBURYh4ogzTx4dk8=; b=gHdMVvbs9f6A9/JwMP7pXGN0QY18EWw0T1Ddb03QXGJqgwN1jsUSWJtv7YUJgXEnbE Wl6d683Kq4eYswbjVbbHuIfCBmThur3yx7qf51ERqxoB3NMM+iQBDdIQBnX33tVb9xqK i32fCWsPbVYV0bVRwvku1skIhN3Hw4aX9uLxU+Ct1N4HG0nEQKb1vk8Vwl01XU/iumMs +GF4GGYDdjYudVKAEGRPrsnvkTip2GL7lgu+nxMsJIGwTlXtfQarLPW+9z5lvIHOvK7Y sknM/lj6w2BGST4kvwhArwL1tpXLsoZpgNGdfMsTFuDt4xQ9YC4Nr2ZUL36mSoz3FIiI EIXQ== X-Forwarded-Encrypted: i=1; AJvYcCUQ1n1ClBy2e/rXyZjxnWIsNk6yLRi9pphkdnVEdBLDCHbsVc2W+DeLRITRFPYnoVLQ1q5yLp3LY05lngjQu2367+s= X-Gm-Message-State: AOJu0Yzm8ronp5j9bOkDNQAt+DKHF6VsXqpPMozJjp4EXZlQvGOBJr8t w/sN6Nrro+FqM3v8tn21xtKAo8hhz++6M8iDt8oX3AUU/zKAMKT5 X-Google-Smtp-Source: AGHT+IE9Mw8tUccks1X22LTAcueisioIwesDxH2vHDyUsIrvhscRuqzeUaHatmmha51tRN2JTA0qDg== X-Received: by 2002:a05:6a00:2e96:b0:708:41c4:8849 with SMTP id d2e1a72fcca58-7085223cda8mr2632099b3a.9.1719580144715; Fri, 28 Jun 2024 06:09:04 -0700 (PDT) Received: from EBJ9932692.tcent.cn ([124.156.216.125]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7080498946bsm1526102b3a.200.2024.06.28.06.09.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 28 Jun 2024 06:09:04 -0700 (PDT) From: Lance Yang To: akpm@linux-foundation.org Cc: dj456119@gmail.com, 21cnbao@gmail.com, ryan.roberts@arm.com, david@redhat.com, shy828301@gmail.com, ziy@nvidia.com, libang.li@antgroup.com, baolin.wang@linux.alibaba.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Lance Yang Subject: [PATCH v2 0/2] mm: introduce per-order mTHP split counters Date: Fri, 28 Jun 2024 21:07:48 +0800 Message-ID: <20240628130750.73097-1-ioworker0@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 22913C0023 X-Stat-Signature: 5gqxd4i9g9pnw69bw7u5oeiccm1gkk33 X-Rspam-User: X-HE-Tag: 1719580145-658321 X-HE-Meta: U2FsdGVkX1+nGQAQfaZghLv5x66rkUpLqxo4c7Eq0dviIxEK/SKQ+WLYWWmYLXuNrfcCu6zD+sMldzhFL6205TTb6po/DT+I1ZSY9GGfAQQ/mxjK87muUUiWgmQwwfPudc1wHbXOfXTwu/c6pQT5vDaxlP2QbWK0BkXC+l+UUYy21YBZ2e0y7GjOGfdJHaHe0YOQum7ZRLarWy4jV9Nia54QXiFawp4U5YmRlqLPRWoDNPXbHDxRWnm0+7LC+6iDh2BUOiE+dHlXxzOhIrGyUy/YPdUy5NkLVRV5GtKZtxMDHMh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XtrD+9XkqyuG8 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000008, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi all, Currently, the split counters in THP statistics no longer include PTE-mapped mTHP. Therefore, we propose introducing per-order mTHP split counters to monitor the frequency of mTHP splits. This will help developers better analyze and optimize system performance. /sys/kernel/mm/transparent_hugepage/hugepages-/stats split split_failed split_deferred --- Changes since v1 [1] ==================== - mm: add per-order mTHP split counters - Update the changelog - Drop '_page' from mTHP split counter names (per David and Ryan) - Store the order of the folio in a variable and reuse it later (per Bang) - mm: add docs for per-order mTHP split counters - Improve the doc suggested by Ryan [1] https://lore.kernel.org/linux-mm/20240424135148.30422-1-ioworker0@gmail.com Lance Yang (2): mm: add per-order mTHP split counters mm: add docs for per-order mTHP split counters Documentation/admin-guide/mm/transhuge.rst | 16 ++++++++++++++++ include/linux/huge_mm.h | 3 +++ mm/huge_memory.c | 19 ++++++++++++++----- 3 files changed, 33 insertions(+), 5 deletions(-)