Re: [PATCH v2] mm: vmstat: fix /proc/sys/vm/stat_refresh generating false warnings

From: Roman Gushchin
Date: Wed Feb 24 2021 - 20:59:32 EST


On Tue, Feb 23, 2021 at 11:24:23PM -0800, Hugh Dickins wrote:
> On Thu, 6 Aug 2020, Andrew Morton wrote:
> > On Thu, 6 Aug 2020 16:38:04 -0700 Roman Gushchin <guro@xxxxxx> wrote:
>
> August, yikes, I thought it was much more recent.
>
> >
> > > it seems that Hugh and me haven't reached a consensus here.
> > > Can, you, please, not merge this patch into 5.9, so we would have
> > > more time to find a solution, acceptable for all?
> >
> > No probs. I already had a big red asterisk on it ;)
>
> I've a suspicion that Andrew might be tiring of his big red asterisk,
> and wanting to unload
> mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings.patch
> mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings-fix.patch
> mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings-fix-2.patch
> into 5.12.
>
> I would prefer not, and reiterate my Nack: but no great harm will
> befall the cosmos if he overrules that, and it does go through to
> 5.12 - I'll just want to revert it again later. And I do think a
> more straightforward way of suppressing those warnings would be just
> to delete the code that issues them, rather than brushing them under
> a carpet of overtuning.

I'm actually fine with either option. My only concern is that if somebody
will try to use the hugetlb_cma boot option AND /proc/sys/vm/stat_refresh
together, they will get a false warning and report them to mm@ or will
waste their time trying to debug a non-existing problem. It's not the end
of the world.
We can also make the warning conditional on CONFIG_DEBUG_VM, for example.

Please, let me know what's your preferred way to go forward.

Thanks!