mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zi Yan <ziy@nvidia.com>
To: Shivam Kalra <shivamkalra98@zohomail.in>,
	Kairui Song <kasong@tencent.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@kernel.org>,
	Lorenzo Stoakes <ljs@kernel.org>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	"Liam R. Howlett" <liam@infradead.org>,
	Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>,
	Barry Song <baohua@kernel.org>, Lance Yang <lance.yang@linux.dev>,
	Usama Arif <usama.arif@linux.dev>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
	Nico Pache <nico.pache@linux.dev>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 0/3] mm: support splitting mappingless swapcache folios
Date: Wed, 05 Aug 2026 08:03:33 -0400	[thread overview]
Message-ID: <590B3189-5B66-4ECB-84CD-7B7EF18C0E54@nvidia.com> (raw)
In-Reply-To: <20260805-b4-mappingless-swapcache-v1-0-b1d78ba257ca@zohomail.in>

On 5 Aug 2026, at 7:18, Shivam Kalra via B4 Relay wrote:

> Large shmem folios lose their address-space mapping when they are written
> to swap, but remain valid members of the swap cache. Folios read from swap
> but not yet associated with an anon_vma can have the same mappingless
> swapcache state. folio_check_splittable() currently mistakes both cases for
> truncation and rejects the split with -EBUSY.
>
> Implement the longstanding TODO for this state. Allow mappingless
> swapcache folios to use the existing uniform order-0 swapcache split path,
> while continuing to reject truly truncated folios and unsupported
> higher-order or non-uniform swapcache splits.

Thank you for your patches.

As Kairui (cc’d) mentioned in [1] (see “A bit more details on this”),
we might not need to implement this split. I will let Kairui to decide
how we should deal with this patchset.

[1] https://lore.kernel.org/all/CAMgjq7CHDG8JhesSPMkn1kzG8jKb0BXO756BvxMQC_MCn2eTyA@mail.gmail.com/
>
> memory_failure() is one caller affected by the restriction: it cannot
> isolate a poisoned base page within a mappingless swapcache THP. The
> end-to-end test uses this case to exercise the complete shmem pageout,
> swapcache split, and swapin path.
>
> The first patch contains the MM implementation. The second adds focused
> KUnit coverage for the split eligibility checks. The third adds the
> end-to-end hwpoison selftest, which pages out a shmem THP, poisons a tail
> page, and verifies both isolation and the data read back from swap.
>
> Tests:
>   - The split_hwpoison_swapcache kselftest passes under x86_64 QEMU
>       using virtme-ng 1.41 (2 GiB RAM, 4 KiB pages).
>
> Signed-off-by: Shivam Kalra <shivamkalra98@zohomail.in>
> ---
> Shivam Kalra (3):
>       mm/huge_memory: allow splitting mappingless swapcache folios
>       mm: add KUnit coverage for mappingless swapcache folios
>       selftests/mm: test hwpoison recovery of mappingless swapcache THPs
>
>  mm/Kconfig                                         |  14 ++
>  mm/Makefile                                        |   1 +
>  mm/huge_memory.c                                   |  18 +-
>  mm/tests/folio_split_kunit.c                       |  52 ++++
>  tools/testing/selftests/mm/Makefile                |   2 +
>  tools/testing/selftests/mm/run_vmtests.sh          |   1 +
>  .../selftests/mm/split_hwpoison_swapcache.sh       |  57 +++++
>  .../selftests/mm/split_hwpoison_swapcache_test.c   | 261 +++++++++++++++++++++
>  8 files changed, 395 insertions(+), 11 deletions(-)
> ---
> base-commit: 0b53bff4fa05ff0d3ffbd3d3bb10fae69dfab498
> change-id: 20260722-b4-mappingless-swapcache-9badf123138a
>
> Best regards,
> --
> Shivam Kalra <shivamkalra98@zohomail.in>


Best Regards,
Yan, Zi

  parent reply	other threads:[~2026-08-05 12:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 11:18 Shivam Kalra via B4 Relay
2026-08-05 11:18 ` [PATCH 1/3] mm/huge_memory: allow " Shivam Kalra via B4 Relay
2026-08-05 11:18 ` [PATCH 2/3] mm: add KUnit coverage for " Shivam Kalra via B4 Relay
2026-08-08 11:10   ` Kairui Song
2026-08-08 15:32     ` Shivam Kalra
2026-08-05 11:18 ` [PATCH 3/3] selftests/mm: test hwpoison recovery of mappingless swapcache THPs Shivam Kalra via B4 Relay
2026-08-05 12:03 ` Zi Yan [this message]
2026-08-05 15:54   ` [PATCH 0/3] mm: support splitting mappingless swapcache folios Kairui Song
2026-08-07 14:18     ` Zi Yan
2026-08-07 21:22       ` Kairui Song
2026-08-08 17:02         ` Zi Yan
2026-08-09 22:19           ` Shivam Kalra
2026-09-08 14:12         ` David Hildenbrand (Arm)

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=590B3189-5B66-4ECB-84CD-7B7EF18C0E54@nvidia.com \
    --to=ziy@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=kasong@tencent.com \
    --cc=lance.yang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=nico.pache@linux.dev \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=shivamkalra98@zohomail.in \
    --cc=shuah@kernel.org \
    --cc=surenb@google.com \
    --cc=usama.arif@linux.dev \
    --cc=vbabka@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®