]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ksm: use a folio in try_to_merge_one_page()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 2 Oct 2024 15:25:27 +0000 (16:25 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 1 Nov 2024 04:28:55 +0000 (21:28 -0700)
commit661fef0c100b0dcc3e20e3e1621ed6300c43f5ec
treed8c79860c9c4e0186c53c84042a6a06e210e4327
parent0493b51bd8c8c16c47d166897142288a372dda8c
ksm: use a folio in try_to_merge_one_page()

Patch series "Remove PageKsm()".

The KSM flag is almost always tested on the folio rather than on the page.
This series removes the final users of PageKsm() and makes the flag only

This patch (of 5):

It is safe to use a folio here because all callers took a refcount on this
page.  The one wrinkle is that we have to recalculate the value of folio
after splitting the page, since it has probably changed.  Replaces nine
calls to compound_head() with one.

Link: https://lkml.kernel.org/r/20241002152533.1350629-1-willy@infradead.org
Link: https://lkml.kernel.org/r/20241002152533.1350629-2-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Alex Shi <alexs@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/ksm.c