[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YDw3lsR1wkaFLhhX@carbon.dhcp.thefacebook.com>
Date: Sun, 28 Feb 2021 16:38:46 -0800
From: Roman Gushchin <guro@...com>
To: Hugh Dickins <hughd@...gle.com>
CC: Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/4] mm: no more EINVAL from /proc/sys/vm/stat_refresh
On Thu, Feb 25, 2021 at 03:12:10PM -0800, Hugh Dickins wrote:
> EINVAL was good for drawing the refresher's attention to a warning in
> dmesg, but became very tiresome when running test suites scripted with
> "set -e": an underflow from a bug in one feature would cause unrelated
> tests much later to fail, just because their /proc/sys/vm/stat_refresh
> touch failed with that error. Stop doing that.
Totally agree!
>
> Signed-off-by: Hugh Dickins <hughd@...gle.com>
Acked-by: Roman Gushchin <guro@...com>
> ---
>
> mm/vmstat.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> --- vmstat1/mm/vmstat.c 2021-02-25 11:50:36.000000000 -0800
> +++ vmstat2/mm/vmstat.c 2021-02-25 11:56:18.000000000 -0800
> @@ -1844,7 +1844,6 @@ int vmstat_refresh(struct ctl_table *tab
> if (val < 0) {
> pr_warn("%s: %s %ld\n",
> __func__, zone_stat_name(i), val);
> - err = -EINVAL;
> }
> }
> #ifdef CONFIG_NUMA
> @@ -1853,7 +1852,6 @@ int vmstat_refresh(struct ctl_table *tab
> if (val < 0) {
> pr_warn("%s: %s %ld\n",
> __func__, numa_stat_name(i), val);
> - err = -EINVAL;
> }
> }
> #endif
> @@ -1862,11 +1860,8 @@ int vmstat_refresh(struct ctl_table *tab
> if (val < 0) {
> pr_warn("%s: %s %ld\n",
> __func__, node_stat_name(i), val);
> - err = -EINVAL;
> }
> }
> - if (err)
> - return err;
> if (write)
> *ppos += *lenp;
> else
Powered by blists - more mailing lists