Re: [PATCH] mm/page_alloc: only update lowmem_reserve_ratio on sysctl write
From: Jianlin Shi
Date: Thu Jul 30 2026 - 23:41:31 EST
On Thu, 30 Jul 2026 15:28:00 +0000 Vlastimil Babka wrote:
> Could we also get rid of this adjustment with proc_dointvec_minmax's
> handling of tbl->extra1 set to SYSCTL_ZERO?
Hi Vlastimil,
Good point, thanks. v2 drops the manual "< 1 -> 0" loop and adds
.extra1 = SYSCTL_ZERO to the lowmem_reserve_ratio ctl_table entry, so
proc_dointvec_minmax() enforces the minimum on write.
For integer values this is equivalent for 0 and positive writes; negative
values now return -EINVAL instead of being silently coerced to 0, which
seems more consistent with other vm sysctls.
I'll send [PATCH v2] in a separate mail shortly.
Thanks,
Jianlin