# Re: \[RFC PATCH 03/57\] mm/collapse: add collapse.h for the shared collapse state

- From: David Hildenbrand (Arm) \<david@kernel.org\>
- Date: 2026-08-19 14:19:52 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/08/17434293
- Thread: https://ratatoskr.run/linux-mm/2026/08/17419184/t/2.md

```text
On 8/17/26 00:45, Kiryl Shutsemau wrote:
> From: "Kiryl Shutsemau (Meta)" <kas@kernel.org>
> 
> Preparation for building the new collapse engine in its own file.  The
> engine and khugepaged.c need to agree on what a collapse result is and
> what state a scan carries.
> 
> Move enum scan_result and struct collapse_control into a new
> mm/collapse.h.
> 
> No functional change intended.
> 
> Assisted-by: Claude-Code:claude-opus-5
> Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
> ---

BTW, I'm wondering whether it would result in less churn (independent of the
other changes) to

a) Rename mm/khugeapged.c to mm/collapse.c

b) Move stuff into mm/collapse.h that a new ...

c) mm/khugapegd.c will need.

-- 
Cheers,

David
```
