Message ID | 20240822224015.93186-1-21cnbao@gmail.com (mailing list archive) |
---|---|
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 53C9FC3DA4A for <linux-mm@archiver.kernel.org>; Thu, 22 Aug 2024 22:40:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 98E498006C; Thu, 22 Aug 2024 18:40:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9156D8005A; Thu, 22 Aug 2024 18:40:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 76A5A8006C; Thu, 22 Aug 2024 18:40:34 -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 562D58005A for <linux-mm@kvack.org>; Thu, 22 Aug 2024 18:40:34 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id CF279817E8 for <linux-mm@kvack.org>; Thu, 22 Aug 2024 22:40:33 +0000 (UTC) X-FDA: 82481351946.16.8F9B20C Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by imf15.hostedemail.com (Postfix) with ESMTP id 1B65EA0024 for <linux-mm@kvack.org>; Thu, 22 Aug 2024 22:40:30 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CGcO0i5N; spf=pass (imf15.hostedemail.com: domain of 21cnbao@gmail.com designates 209.85.210.175 as permitted sender) smtp.mailfrom=21cnbao@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=1724366323; 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=zWWpnqWRODr8kHzJl6yw6khun8cbsZY6Wz6VJHrsR3w=; b=7ElCsAoxoLjX9ZxZJevYU5e4YIQDAz74RW31MVfASX1jblVpzlVCAKaihW2/38PwHyv2Xl y1MPUtR+c140unhu8X5qBDPvh4V6JshCh8i+o06qfsgriGMm7gMYJmZX+cAMQUJsMoXw7t /Xe0MaXoYgRHA8xn8u+azdyqU038mEs= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CGcO0i5N; spf=pass (imf15.hostedemail.com: domain of 21cnbao@gmail.com designates 209.85.210.175 as permitted sender) smtp.mailfrom=21cnbao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724366323; a=rsa-sha256; cv=none; b=YIsLqtS1Vb7zDymYumGsGhiXzRee0HJORW2+n8joOe8LKWUQYoPN47g2q4+F1jHmwXPj10 3mv26y5WRAQUYNAXb6C7H8WRERJHgkP++/KC9WRjF0qFobtbYwgTZN1iUf1phlgrmVWfjK 9XC/x2QfLNiuXzE20w3drY3IgUHdLnc= Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-714187df604so1552404b3a.1 for <linux-mm@kvack.org>; Thu, 22 Aug 2024 15:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724366430; x=1724971230; 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=zWWpnqWRODr8kHzJl6yw6khun8cbsZY6Wz6VJHrsR3w=; b=CGcO0i5NFiFT5YkQIckZi4czcRiNAsQXANYXl6uPNNOR0LBe/t7wrZx1Qbj8/90TAy Ajz/VSnVXSD0f9eG5f36WpGpT8c6UAFDMUQHeYOC3iqWLDkusn/PK8ooHb5wF6ju62TL EXrM33bDQqb/cOnZOb2A3/alIXLFf+v3jG/ZNdtq9Jnqb/+pgTk7TsBFLDqJ1dH9lzL+ 2XalI1pKMGPnXGCzabSdf5NYL1KoLmmCE36xpLt5UUbYmGuinc+j+QbAgL06SSK7cMef xPcfH4POcxmdo23kyCRiZtAUN6ibS0k29ku6x103sTyAj8duB5vCE+7tkBxqNEOK+UNm aHgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724366430; x=1724971230; 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=zWWpnqWRODr8kHzJl6yw6khun8cbsZY6Wz6VJHrsR3w=; b=ld3dIiXakTBLPBDH25bto9x5zhPZ3kWL7aAGrskLWR5e3MtOBZe+j+cBlmken3B/pj 6mOBKQCDUze+d9+lp7RiUDTZHkXJlek30WEWHVu2JYvEe95QBFEapRf9HePqhEZlUzDR Leo/sFMt0SAt4puidxgN+h3WX/b3SM9s9Im7GxVQJ9QhptBQZf/VNWFQK8OynEsY48rt 8PMAk5gFnD1tj+baFvnfMFjwb+x1joBY/KnU3Kx78/LM7oxIFll1Y0w5OrZSMYPUBMq4 wLqatsoovWjENAU1CVTsTjDViL/jroOxuV+mECqg+OslPp2ho2qfB7aXUzruCK4rejOJ 8L+w== X-Forwarded-Encrypted: i=1; AJvYcCVilJu5HmjdVCU2AWAQYNOJpvChZDhba7F+fndXHHbxbTEr31/FAob0yZDPjZ5uuIlA4+tbYFeBfQ==@kvack.org X-Gm-Message-State: AOJu0Yx4pd2Cpelkm3q2qr9jNBw+6yUXL4CR+Z0AzdskI2o1gRRERLb+ S4ujkYihmcbLtbUAWEXOvJr6jYC0nKP4lsqbyDCFUjLgoiLy+4TB X-Google-Smtp-Source: AGHT+IHwHwKPCfecstS5+UFp+9p02u8bULrq0z++VtyZDRwdSsHdIkT+rIFUaJtNqfbblXA5nPn9/w== X-Received: by 2002:a05:6a21:4603:b0:1c6:b0cc:c510 with SMTP id adf61e73a8af0-1cc89d6b9ddmr756708637.9.1724366429574; Thu, 22 Aug 2024 15:40:29 -0700 (PDT) Received: from Barrys-MBP.hub ([2407:7000:8942:5500:427:337e:a4f:8e74]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7cd9acabccasm1609912a12.27.2024.08.22.15.40.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Aug 2024 15:40:29 -0700 (PDT) From: Barry Song <21cnbao@gmail.com> To: akpm@linux-foundation.org, linux-mm@kvack.org Cc: baolin.wang@linux.alibaba.com, chrisl@kernel.org, david@redhat.com, hanchuanhua@oppo.com, ioworker0@gmail.com, kaleshsingh@google.com, kasong@tencent.com, linux-kernel@vger.kernel.org, ryan.roberts@arm.com, v-songbaohua@oppo.com, yuanshuai@oppo.com, ziy@nvidia.com, usamaarif642@gmail.com Subject: [PATCH v3 0/2] mm: collect the number of anon mTHP Date: Fri, 23 Aug 2024 10:40:13 +1200 Message-Id: <20240822224015.93186-1-21cnbao@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 1B65EA0024 X-Stat-Signature: 1kkce87inwem15cupf5d8zp15jf647dp X-Rspam-User: X-HE-Tag: 1724366430-276831 X-HE-Meta: U2FsdGVkX1+42l2qBnJvf3x0zMlHit/Y9meQvZjaMwUQpJiSDDjfec9kdCLtVZ68dCifj0u0ZVHiLuQ2Qcl2leYZgsmj+31+et8D6YyXu0DgMW83dxw5fFZyQytaESRFJdJbK/WBD98dgNl2BhZO7HAzbYV6Ut7EQXs73Y4oxoWTgTrcZYYBapWmzDop/ALC9faXrLBXwTH7M4Pj27PTSBMy4PYEb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FrZUrMFvnwAnfT62nj7XZ2kX2m/OH7VJVH0uEynDOEnWNxa+taCzu3i01L0R9KouZDoBLB4DEAQNwdSfHyBF18UTwCUd3SbrgVi2ZAMdnw13HO9K13uviutGuOkL5QuSdR4gIOWskG3qqx9kIFvFyp1PQA6SGMg3Pl3T1JYgLrztO0cleORu9 X-Bogosity: Ham, tests=bogofilter, spamicity=0.004373, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm: collect the number of anon mTHP
|
expand
|
From: Barry Song <v-songbaohua@oppo.com> Knowing the number of anon mTHPs in the system is crucial for performance analysis. It helps in understanding the ratio and distribution of mTHPs versus small folios throughout the system. Additionally, partial unmapping by userspace can lead to significant waste of mTHPs over time and increase memory reclamation pressure. We need this information for comprehensive system tuning. -v3: * collect David's acked-by, thanks! * rename nr_split_deferred to meaningful name - nr_anon_partially_mapped, per David. Ryan, I assume you will like it after you come back :-) -v2: https://lore.kernel.org/linux-mm/20240811224940.39876-1-21cnbao@gmail.com/ * don't rely on rmap to implement - 1, uses folio_free, split etc. Thanks for David's comment; * rename sys counters and refine doc. Thanks for Ryan's comment; -v1: https://lore.kernel.org/all/20240808010457.228753-1-21cnbao@gmail.com/ Barry Song (2): mm: collect the number of anon large folios mm: collect the number of anon large folios partially mapped Documentation/admin-guide/mm/transhuge.rst | 10 ++++++++++ include/linux/huge_mm.h | 16 ++++++++++++++-- mm/huge_memory.c | 19 ++++++++++++++++--- mm/migrate.c | 4 ++++ mm/page_alloc.c | 5 ++++- mm/rmap.c | 1 + 6 files changed, 49 insertions(+), 6 deletions(-)