On 6/11/26 12:28 AM, Nico Pache wrote:
On Wed, Jun 10, 2026 at 4:29 AM Baolin Wang
<[email protected]> wrote:
(Note: this patchset is not targeting v7.2, but posted for early feedback.)
This is a follow-up patchset for mTHP collapse to support shmem mTHP collapse,
which is based on Nico's patchset[1].
The shmem mTHP collapse strategy follows the anonymous mTHP collapse approach:
track present pages via a bitmap while scanning PMD ranges for collapse
candidates,
then use the bitmap after the scan completes to determine the most efficient
mTHP order to collapse to. Built on the basic framework added for anonymous
mTHP collapse, the shmem mTHP collapse implementation is straightforward
(Thanks for Nico's work).
As promised I will review this series :)
Great. Thanks.
In addition, I have added some anon/shmem mTHP collapse selftests, and now all
khugepaged test cases can pass.
Thank you for doing that!!
I was just working on adding the anon mTHP selftests. Any chance we
can separate out those bits and just send a series for adding anon
mTHP selftests without the file-related changes? Then your series adds
the bits you need here for shmem collapse? Thank you for doing all the
heavy lifting there to generalize those functions :)
It's easy to separate out the anon mTHP selftests, but I'd like to get
some feedback first. Once everyone feels the selftests are in reasonable
shape, I'd appreciate help with review and testing (and even adding more
test cases on top of them).