Re: [PATCH] mm/page_alloc: only update NUMA min ratios on sysctl write
From: Jianlin Shi
Date: Tue Jul 28 2026 - 06:32:16 EST
On Mon, 27 Jul 2026 15:51:38 -0700 Andrew Morton wrote:
> AI review points out that lowmem_reserve_ratio_sysctl_handler() has the
> same issue:
>
> https://sashiko.dev/#/patchset/tencent_5891052AF9A4C2D490A62F478D446F74AB09@xxxxxx
>
> All these changes are non-backward-compatible userspace API changes.
> It's really lame and somewhat unlikely, but we should give
> consideration to this. Perhaps there are systems out there which are
> dependent on the side-effects of reads from these files. We should be
> careful about these things.
>
> So I suggest that these changes be proposed as two or three standalone
> patches (independently revertible if problems are discovered) and that
> each one contains a description of the worst-case regressions which
> such oddball userspace might encounter.
Hi Andrew,
Thank you for taking another look, and for the careful note about
possible userspace relying on read side-effects. That is a fair point;
I had not considered it.
I believe the NUMA min_unmapped_ratio / min_slab_ratio change may
already be present as 874611d193f2 ("mm/page_alloc: only update NUMA
min ratios on sysctl write"). If I have that right, I will not resend
that part.
I will send only the remaining lowmem_reserve_ratio fix as a
standalone patch, with a worst-case userspace note as you suggested.
Please let me know if I misunderstood the tree state.
Thanks,
Jianlin