Re: [PATCH v4 2/5] tools/lib/mm: add shared file helpers

From: Sarthak Sharma

Date: Mon Jun 01 2026 - 02:12:23 EST




On 5/27/26 7:54 PM, Sarthak Sharma wrote:
> Move read_file(), write_file(), read_num(), and write_num() out of
> tools/testing/selftests/mm/vm_util.c into a new shared helper under
> tools/lib/mm/.
>
> These helpers are used by mm selftests today and will also be needed by
> shared hugepage helpers in subsequent patches. Move them to a generic
> location so they can be reused outside selftests as well.
>
> Keep the helpers exposed to mm selftests through vm_util.h by including
> the new shared header there, and link the new helper into the
> selftests/mm build.
>
> Add tools/lib/mm/ to the MEMORY MANAGEMENT - MISC entry in MAINTAINERS.
>
> Signed-off-by: Sarthak Sharma <sarthak.sharma@xxxxxxx>
> ---

Hi Andrew!

Can you please fold the below fixlet into patch 2, as suggested by
Sashiko.

This moves the x86 Makefile prerequisite path fix earlier in the series,
so patch 2 remains buildable on its own. The same hunk is already
present in patch 3 of v4, so if this is folded into patch 2, the
duplicate hunk and the corresponding commit message sentence should be
dropped from patch 3.

If a larger respin is needed after reviewer feedback, I will fold this
into patch 2 in v5 myself.

---