Re: [PATCH] tmpfs: reset the memory policy on remount with mpol=default

From: Yifan Feng

Date: Sat Nov 28 2026 - 14:03:30 EST


On Fri, 27 Nov 2026 16:10:49 -0800 Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> So aiui, remounting with mpol=default "succeeds", but new file
> policies still get the old mempolicy instead of using the "process
> allocation policy"?

Yes. The remount returns 0, /proc/mounts keeps the old mpol=, and
files created after it are still allocated by the old policy. In a
2-node guest, after mount mpol=interleave:0-1 and remount,mpol=default,
a new 32 MB file was still 16 MB on each node. With the patch it is
all on the node of the writing task.

> hp2:/usr/src/mm> egrep -r "mempolicy|mpol" tools/testing/selftests/mm

I can write a selftest for the tmpfs mpol= option if that is welcome.

Thanks,
Yifan