Re: [PATCH v3 2/2] ksm: Optimize rmap_walk_ksm by passing a suitable address range
From: David Hildenbrand (Arm)
Date: Fri Apr 10 2026 - 05:06:34 EST
> It looks confusing indeed, but it does break_cow because when merging two pages into
> one KSM, the first one succeeds but the second one fails, so it's necessary to
> restore the state of the first successful rmap_item.
>
>> So we might want to reset the pgoff there as well, OR only store
>> the pgoff in stable_tree_append() where we actually set STABLE_FLAG.
>>
>
> Yes, I agree. Please allow me to reorganize all the key points we've discussed, and
> update and optimize the patch along with the test program.
Sure, let me know if I can help.
>
> I will try to release v4 for review as soon as possible
Yes, no rush. Merge window is about to open, so we have 2/3 weeks where
nothing new will get merged either way.
--
Cheers,
David