Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp882956lqd; Wed, 24 Apr 2024 22:26:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3eU8jHTYWncqbwpBxAeUB5a0bOcbvO7E8cR484VVLDY9vqIaCAAmzjVWukNxqb7iHtgn3E6qAElZ8bgM7zrbxaZIBYlK+fCbVEo7WwA== X-Google-Smtp-Source: AGHT+IEp+Vr6NNxUR7RZqNi9md14c08xU5MvmCG59TaJgwZXnhEm7dpjjRuMZgkVTOQcKJcfJCJk X-Received: by 2002:a05:620a:51d2:b0:78d:6b42:6c17 with SMTP id cx18-20020a05620a51d200b0078d6b426c17mr4665240qkb.76.1714022792210; Wed, 24 Apr 2024 22:26:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714022792; cv=pass; d=google.com; s=arc-20160816; b=mRgGUJ+kP1iTDXo5edbDd5nTDACV7n/bbV3EpdGsUEnssxPUqnYX8dQfm58T4J2W5E xxouu2mphxU3U4CJWjj46T8v2JxiQ7l9Rc29ApmfF7jGjj0oECZcdC3HcVihMGJ9P0vR BrcJqgBkCjDuXmOfDJ60OuOg++m6CWxt5e3DylSGlbNRbcb/PwWf6hdXG0gKZWfLgNvm JW3NaXamlJEJq8ci6HXTvuLaZVx5uH0hfCKikCiKA0kRDOLEqwE/+qwbpfsM7prwWEoE M58Q475hDUhXnqbHmetyarlGf1GBKR7tBtG9MKn0A6DQNziBZqdjzHQVwOx+TXAW2Qn2 Duyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=sA3a0+bFXC6l/JW4VkTNie0ZM8xCuh6B/dLkqCRLBy4=; fh=vqnglj25oSx8n8RsKMM4a0TbMYAlnAhp/fqorjpqELE=; b=TfRw5ha+QW4SyenEiBtX9gBjhcqPhXI7hZKEzNzXTNneO40nZhhH/mHBUJ5JB/EgvM sHqiKMO2CGsgzS/ksN3BWaYgQAvAF18H4hposLC0zpis3JbeKIOcXX+6cxp4n9ZeUGGx pr4oPHuRW7lc46MGoNDsOIVOyF4UaH/zAPEw+pzk/oYF6aW4JbC0NoIiXa+/jXP1dWCT z0cKJ3ul3Y6iq20YF2vkRz0yiZh6S3iS4mc9I1OYxBfVGlNAf1mTshtnmD9WZdp0fbaG xZRv3wJ+IzlGm5dnPqHNs/9HtGHx5iO0KgMe5pohdIoI7XYkd0gYFZkO0Cuy1RsfLWgL F6Iw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TeoWFQrj; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-158023-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158023-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y6-20020a05622a120600b004365142e0f7si16580985qtx.385.2024.04.24.22.26.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 22:26:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158023-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TeoWFQrj; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-158023-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158023-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EC5E21C213E8 for ; Thu, 25 Apr 2024 05:26:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 293CA3B2A1; Thu, 25 Apr 2024 05:26:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TeoWFQrj" Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC85D23CE for ; Thu, 25 Apr 2024 05:26:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714022786; cv=none; b=mKY71l8CYrticaI4eB8QV6mTULvEZsEzoZaUm5ADfF/gxj/w1knUax26eIiwmfom83aGCsYm+ITYslKKqkmKG8jkpOF8ehsW6PsZAQwdBoKrqMNdOWh0dLBEzW0Mti6cnjPCWhzXbA7aGwbTACVWLuLOrCBWWmu61BtM5ngGi84= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714022786; c=relaxed/simple; bh=9ovT6b7MNfGv/Jda4rDiDUWp3cF6u7GPhmK/OGAJzyI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=WslBl+W8ljFB4dzQ7PxvJ1JcWtnYeXPzs7AgCLFsl+ZfnhdWypr/5EyAHMklgVd68e8kVoiF6gS8vu4YkrJOL6R/78Ryg2BEJpcV15NwUv9/cA7QyqBKSOgyhaSokvlqGkyfekdA5RldFFo3YbAZs8Kd29rVB2t4+2OtwbjYDEA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TeoWFQrj; arc=none smtp.client-ip=209.85.208.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2db17e8767cso5950361fa.3 for ; Wed, 24 Apr 2024 22:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714022783; x=1714627583; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=sA3a0+bFXC6l/JW4VkTNie0ZM8xCuh6B/dLkqCRLBy4=; b=TeoWFQrjYYnuG7aMHqd4oVfJf9FWWCQ4q9eoSUebiVSoEXKX5T+EnKl8Ixiu3fPdPA 1A5YbMLp7rzaNU4wxupFVZ8d3upLnnwEViK/TUf3Ra5BxrQO3Uh4vE+C1ukd1JOtUV2m bdboAorFuZymlUWv3DZac5HJcFyME2JFQDYYRLDQ4/TLTwFN3jop+4YQcO7a+OqVS7GM 4YxGiPiP7N/K4+ZPrsmVaIrCwQQHc9Fe2iRHaN8PbKxmtCBQ7C4kyHQiHC9iodzQ53lG hPnhspXdLtNFkVF4dbaL56KxSk6edNsZaHFC6gAV51LAm3Qq4rFOc1tUYO4NQgapruH0 /Xsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714022783; x=1714627583; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sA3a0+bFXC6l/JW4VkTNie0ZM8xCuh6B/dLkqCRLBy4=; b=QgeKKyBNuzkce751EYpQzCUgyHJkEH67PAuzZ/0sIsSXQZ+sRBRcj+IOCM9QQ1gmW0 5tBs7/X9ewfx629lI5reTQs8fFsSoPTaKsCa/i/+KG2ojOmaCrqQp9gg+/cQRwNRXXZq mROva4MNXaJHO7nSstjvgDEys/eRCKAR58hGjCT9BmHqvPvtZTeXelwQLV6qdh+w0YXN KjOC9TkyK1S+qmSAbnaOi5qLTIN6SN7X53iua5B/5F1cVn6+rbUpyEs7Znx54lqbR2fF 60FvN7/kUGGaaZz2gIlaeWKacmsuOGW+u6+TMMvhrxjchBJB2t3hz4ayszfBbBwE0TIG 2lmw== X-Forwarded-Encrypted: i=1; AJvYcCWH1ByKtBae4jS9nnIHWhbdL0rNj4JfhMbkMjlWCGrnKWozhqDY/bJAc7Ymh+Ga/jr8T1xSaif+k2ZGUpOb7uXxSzA9oay+JfkbuPj4 X-Gm-Message-State: AOJu0Yxc7meIBe6IPTWx5bLTI+m6+yPgEfCNESKSFUx0rGfIUJbEDmDW sqpYPDmoW3oKH9X/LaqoAzsTyFcinzzzHprvoBUQGkvmAO/kSBRX4rdkmVZkSknz20pInM+FuZd 4MF+GH7OYd9Iwk/3gIZPlzWKmQiC7RE3n X-Received: by 2002:a05:6512:40e:b0:518:d4c3:4682 with SMTP id u14-20020a056512040e00b00518d4c34682mr2723897lfk.24.1714022782549; Wed, 24 Apr 2024 22:26:22 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240424135148.30422-1-ioworker0@gmail.com> <20240424135148.30422-3-ioworker0@gmail.com> <0534d647-0753-4c34-943c-e705db1fbddd@arm.com> In-Reply-To: <0534d647-0753-4c34-943c-e705db1fbddd@arm.com> From: Lance Yang Date: Thu, 25 Apr 2024 13:26:11 +0800 Message-ID: Subject: Re: [PATCH 2/2] mm: add docs for per-order mTHP split counters To: Ryan Roberts Cc: akpm@linux-foundation.org, 21cnbao@gmail.com, david@redhat.com, baolin.wang@linux.alibaba.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey Ryan, Thanks for taking time to review! On Wed, Apr 24, 2024 at 11:34=E2=80=AFPM Ryan Roberts wrote: > > On 24/04/2024 14:51, Lance Yang wrote: > > This commit introduces documentation for mTHP split counters in > > transhuge.rst. > > > > Signed-off-by: Lance Yang > > --- > > Documentation/admin-guide/mm/transhuge.rst | 16 ++++++++++++++++ > > 1 file changed, 16 insertions(+) > > > > diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation= /admin-guide/mm/transhuge.rst > > index f82300b9193f..35d574a531c8 100644 > > --- a/Documentation/admin-guide/mm/transhuge.rst > > +++ b/Documentation/admin-guide/mm/transhuge.rst > > @@ -475,6 +475,22 @@ anon_swpout_fallback > > Usually because failed to allocate some continuous swap space > > for the huge page. > > > > +split_page > > + is incremented every time a huge page is split into base > > perhaps "...successfully split into base..." to make it clear that this i= s only > incremented on success. Yep. Your suggestion does make it clearer. > > > + pages. This can happen for a variety of reasons but a common > > + reason is that a huge page is old and is being reclaimed. > > + This action implies splitting all PMD/PTE mapped with the huge pa= ge. > > What does it mean to "split all PTE"? It's already at its smallest granul= arity. > Perhaps "This action implies splitting any block mappings into PTEs."? Nice. It would be clearer and better! Thanks again for the suggestions! Lance > > > + > > +split_page_failed > > + is incremented if kernel fails to split huge > > + page. This can happen if the page was pinned by somebody. > > + > > +deferred_split_page > > + is incremented when a huge page is put onto split > > + queue. This happens when a huge page is partially unmapped and > > + splitting it would free up some memory. Pages on split queue are > > + going to be split under memory pressure. > > + > > As the system ages, allocating huge pages may be expensive as the > > system uses memory compaction to copy data around memory to free a > > huge page for use. There are some counters in ``/proc/vmstat`` to help >