From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Longlong Xia <xialonglong2025@163.com>,
Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Longlong Xia <xialonglong@kylinos.cn>,
Xu Xin <xu.xin@linux.dev>,
Chengming Zhou <chengming.zhou@linux.dev>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/14] mm/ksm: merge-path cleanups and folio conversion
Date: Wed, 16 Sep 2026 08:37:09 +0200 [thread overview]
Message-ID: <d490e314-b92f-4120-93fc-ae36f487b135@kernel.org> (raw)
In-Reply-To: <20260915222545.5683-1-xialonglong2025@163.com>
On 9/16/26 00:25, Longlong Xia wrote:
> Thanks for the review. You are right that I did not justify the
> page/folio boundary clearly enough.
>
> Patches 11-13 only avoid converting the target page back to a folio and
> provide no functional or performance benefit by themselves.
>
> I will separate the independent cleanups and drop or rework 11-13 after
> getting guidance from the KSM maintainers. I also found a NULL/bisectability
> issue in v1 patch 12, which I will fix before any follow-up.
In general: once we have a ksm folio (folio_test_ksm()), it can only be a small
folio and we can operate on the folio only.
Until that point, we really need the page, because we might be dealing with a
page in a large folio. Sure, we can carry a folio+page pair to reduce repeated
folio lookups, but be aware that we have to re-lookup the folio and take care of
references whenever we call into something that could end up splitting the
folio. So we have to be a bit careful around that.
--
Cheers,
David
next prev parent reply other threads:[~2026-09-16 6:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 15:12 Longlong Xia
2026-09-15 15:12 ` [PATCH 01/14] mm/ksm: constify ksm_next_page_ops Longlong Xia
2026-09-15 15:12 ` [PATCH 02/14] mm/ksm: rename advisor_ctx to ksm_advisor_ctx Longlong Xia
2026-09-15 15:12 ` [PATCH 03/14] mm/ksm: use the correct format specifier for max_page_sharing Longlong Xia
2026-09-15 15:12 ` [PATCH 04/14] mm/ksm: add advance_scan_mm_slot() helper Longlong Xia
2026-09-15 15:12 ` [PATCH 05/14] mm/ksm: make remove_stable_node_chain() return bool Longlong Xia
2026-09-15 15:12 ` [PATCH 06/14] mm/ksm: clear all slab cache pointers in ksm_slab_free() Longlong Xia
2026-09-15 15:12 ` [PATCH 07/14] mm/ksm: reuse the zero page pointer for merge tracing Longlong Xia
2026-09-15 15:12 ` [PATCH 08/14] mm/ksm: document the two remove_rmap_item_from_tree() calls Longlong Xia
2026-09-15 15:12 ` [PATCH 09/14] mm/ksm: move the no_vmas label out of the if block Longlong Xia
2026-09-15 15:12 ` [PATCH 10/14] mm/ksm: extract ksm_begin_full_scan() from scan_get_next_rmap_item() Longlong Xia
2026-09-15 15:23 ` [PATCH 11/14] mm/ksm: pass folios to replace_page() Longlong Xia
2026-09-15 15:23 ` [PATCH 12/14] mm/ksm: take the ksm folio in try_to_merge_one_page() Longlong Xia
2026-09-15 15:23 ` [PATCH 13/14] mm/ksm: take the ksm folio in try_to_merge_with_ksm_page() Longlong Xia
2026-09-15 15:23 ` [PATCH 14/14] mm/ksm: update merge helper comments for folios Longlong Xia
2026-09-15 16:48 ` [PATCH 00/14] mm/ksm: merge-path cleanups and folio conversion Matthew Wilcox
2026-09-15 22:25 ` Longlong Xia
2026-09-16 6:37 ` David Hildenbrand (Arm) [this message]
2026-09-16 8:46 ` Longlong Xia
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=d490e314-b92f-4120-93fc-ae36f487b135@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
--cc=xialonglong2025@163.com \
--cc=xialonglong@kylinos.cn \
--cc=xu.xin@linux.dev \
/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®