mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fujunjie <fujunjie1@qq.com>
To: Nhat Pham <nphamcs@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Alexandre Ghiti <alexghiti@meta.com>,
	Kairui Song <kasong@tencent.com>,
	Usama Arif <usamaarif642@gmail.com>, Chris Li <chrisl@kernel.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Yosry Ahmed <yosry@kernel.org>,
	David Hildenbrand <david@kernel.org>,
	Hugh Dickins <hughd@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	linux-kernel@vger.kernel.org, cgroups@vger.kernel.org
Subject: Re: [RFC PATCH v2 9/9] docs: mm: update THP swapin counter descriptions
Date: Sun, 31 May 2026 21:21:05 +0800	[thread overview]
Message-ID: <tencent_2C7744E4A6CB428C4BEA795851797EC38305@qq.com> (raw)
In-Reply-To: <CAKEwX=NDfJud3FM4Y+Ek3RtTtwi2aXWeDCujNxh2ReUEq-m4oA@mail.gmail.com>



On 5/30/2026 2:37 AM, Nhat Pham wrote:
> On Fri, May 29, 2026 at 5:19 AM fujunjie <fujunjie1@qq.com> wrote:
>>
>> The THP swapin counter descriptions still describe large swapin as
>> coming only from non-zswap swap devices. Update them now that
>> zswap-backed large folio swapin can also increment swpin.
>>
>> Also describe policy and backend rejection as swpin_fallback cases,
>> since speculative zswap large swapin can intentionally fall back before
>> doing large IO.
>>
>> Signed-off-by: fujunjie <fujunjie1@qq.com>
>> ---
>>  Documentation/admin-guide/mm/transhuge.rst | 11 ++++++-----
>>  1 file changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst
>> index 23f8d13c2629..59b7a0d09243 100644
>> --- a/Documentation/admin-guide/mm/transhuge.rst
>> +++ b/Documentation/admin-guide/mm/transhuge.rst
>> @@ -667,13 +667,14 @@ zswpout
>>         piece without splitting.
>>
>>  swpin
>> -       is incremented every time a huge page is swapped in from a non-zswap
>> -       swap device in one piece.
>> +       is incremented every time a huge page is swapped in from swap or
>> +       zswap in one piece.
>>
>>  swpin_fallback
>> -       is incremented if swapin fails to allocate or charge a huge page
>> -       and instead falls back to using huge pages with lower orders or
>> -       small pages.
>> +       is incremented if swapin cannot use a huge page and instead falls
>> +       back to using huge pages with lower orders or small pages. This can
>> +       happen because allocation or charging fails, or because policy or
>> +       backend state rejects a speculative large swapin.
> 
> I think we should add separate zswpin and zswpin fallback counter for
> THP rather than overloading swpin. We already do that for zswpout vs
> swpout.

that makes sense.


  reply	other threads:[~2026-05-31 13:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 12:17 [RFC PATCH v2 0/9] mm: support zswap-backed large folio swapin fujunjie
2026-05-29 12:19 ` [RFC PATCH v2 1/9] mm/zswap: expose range state for swapin policy fujunjie
2026-05-29 18:35   ` Nhat Pham
2026-05-31 13:47     ` Fujunjie
2026-05-29 12:19 ` [RFC PATCH v2 2/9] mm: let swap_read_folio() report retryable zswap races fujunjie
2026-05-29 12:19 ` [RFC PATCH v2 3/9] mm/zswap: support fully zswap-backed large folio loads fujunjie
2026-05-29 18:25   ` Nhat Pham
2026-05-31 20:03     ` Fujunjie
2026-05-29 12:19 ` [RFC PATCH v2 4/9] mm: admit large swapin by backend range in swapin_sync() fujunjie
2026-05-29 14:43   ` Kairui Song
2026-05-29 14:45     ` Kairui Song
2026-05-31 12:34       ` Fujunjie
2026-05-31 12:21     ` Fujunjie
2026-05-29 18:34   ` Nhat Pham
2026-05-31 13:15     ` Fujunjie
2026-05-29 12:19 ` [RFC PATCH v2 5/9] mm: add common locality admission for zswap large swapin fujunjie
2026-05-29 19:00   ` Nhat Pham
2026-06-01  9:47     ` Fujunjie
2026-05-29 12:19 ` [RFC PATCH v2 6/9] mm: provide anon locality evidence " fujunjie
2026-05-29 19:22   ` Nhat Pham
2026-05-31 13:11     ` Fujunjie
2026-05-29 12:19 ` [RFC PATCH v2 7/9] mm/shmem: provide VMA-hint locality " fujunjie
2026-05-29 12:19 ` [RFC PATCH v2 8/9] mm: try all-zswap large swapin within swap readahead windows fujunjie
2026-05-29 12:19 ` [RFC PATCH v2 9/9] docs: mm: update THP swapin counter descriptions fujunjie
2026-05-29 18:37   ` Nhat Pham
2026-05-31 13:21     ` Fujunjie [this message]
2026-05-29 18:06 ` [RFC PATCH v2 0/9] mm: support zswap-backed large folio swapin Nhat Pham
2026-05-31 12:32   ` Fujunjie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_2C7744E4A6CB428C4BEA795851797EC38305@qq.com \
    --to=fujunjie1@qq.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexghiti@meta.com \
    --cc=cgroups@vger.kernel.org \
    --cc=chrisl@kernel.org \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=kasong@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=usamaarif642@gmail.com \
    --cc=yosry@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®