Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp780674pxb; Thu, 25 Feb 2021 15:13:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2oXmnZU3vkL+s6ellSg4nVhM93HDxWpURnjmsNIOMOQf3DsPw1KdHIkSsq18FpSlOuDzv X-Received: by 2002:a05:6402:1c0a:: with SMTP id ck10mr328297edb.318.1614294827265; Thu, 25 Feb 2021 15:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614294827; cv=none; d=google.com; s=arc-20160816; b=ya7VdwHLCilDoBxX1eWdQCQwn0Nd3Oy4uog6kCfhuMb414W/fVfr68aCpeKRx/5f4u EAiwEDTRwdPR1OuqhiGXD7oQmA4bP/+Rq3TLA8R8iS9DYF+oJgSTrKWIGKU16rKtT0c9 imLC7tlB1eSgoAeZ61DmHamUM0CDx3nWSPFXSK+fWpbWBQLAUn4Ej95gKJYzEpj0CZEk WX3FTiM9XrcBoDUlgp4wZSEuOQk/qX7bAvi+JnZsexlmzoFuW0FzlhBn6RDZg5HRixUY vKo5TwSsFFjuZ+rmx5PXPUxMnn4YK7YOm7I5o48ubjZ0k9/6HQGwH2LNGctHYw9gdEVR ACiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=ZTnYHREJjaxknDfDoBhteeW5RbBqwnc0KAb8pOQepb4=; b=IcNdEdjgaLq8K7828e3Q8LvRknyxWt5ujGyTpaGtA9AG3Jp1axEZ0Apzppf1qiF8bE prUOg+t8+yJFkEt+GHrGg5ECymhuOrmdodzwjs3M97+XiCPceYiGwFg7fxcdsWNyNVq7 Ivi958ZfmfdhoFT/lEmkHGLh72AkjL7CPIYc08qcnuLdXW8GfYnt8YZ+6Ou9IlEOTelD 0P5FQwT3m2it3WZxy+4SqzdLY7zM/SDxoKTSJAQCp3P2876Hvo8v3UUlYNVAvEZyb1qx eOzLPNamOL2pAkZ594hAT9rijx6M79xnNp//L+Noqf4O3WXX4J+7zceTdgQKVvJGA0nC uuJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DZjrfGHZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si3971072ejv.268.2021.02.25.15.13.24; Thu, 25 Feb 2021 15:13:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DZjrfGHZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231629AbhBYXMz (ORCPT + 99 others); Thu, 25 Feb 2021 18:12:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230040AbhBYXMx (ORCPT ); Thu, 25 Feb 2021 18:12:53 -0500 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96DEBC061574 for ; Thu, 25 Feb 2021 15:12:13 -0800 (PST) Received: by mail-ot1-x334.google.com with SMTP id f33so7375302otf.11 for ; Thu, 25 Feb 2021 15:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=ZTnYHREJjaxknDfDoBhteeW5RbBqwnc0KAb8pOQepb4=; b=DZjrfGHZzY4vsUofUZQCjn59YAhiXPKAnJ0rls9m6Kt0kXHk2mBMCkFhXhrp+jbrxL Qwcjk51wJbhUOwPAqgrQ5RS8FW/Dcfa/sa+GGoq0nefrWiPSZRxcJPcN8M3DWrDTmuPQ laQpOGEIbbN0w4e/VITz2sWDKuZDnUGfdcKPS7NdlwWjkewZ6DPa7vpI7aYpQXX3qvWH bmljy+vS2gqnuJCBqydx8G5kbTCcDm7ZNwkImHgau1f+OPeCa77FI1zifAhaNF1QjYdG j6II8PQWIc32iQ6keYblKkFjoZuT0tAx0f77knppoZjysx3235SUF6G7vRGJKLVZMHVn 5AVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=ZTnYHREJjaxknDfDoBhteeW5RbBqwnc0KAb8pOQepb4=; b=L4bKDuwvdaz86B/F9PU21PwxnXdifxflUqjdquTzBg2E6eZuc21+dC0yRqhFuE/9Er /mLqAWetM9zkmGoop3hxrvRk/hLKCJsyM6HeqwXj5HfLt287x2m6gvNzrzNtPqZ4i4Ut SowGBn1r8tFG9KnbvGglFjz9QmeE1xTTmPUUaw5Wz4iSSV33HtzK00q12zxBWi51vgLl qk7R3+Ap28u0rj5mqYfDG3bvDsvn9/WKW6k2NwpzWZa8WSYeVQet+dm62E15xQmGd5bl so3lKoOjmnSRmt/vKKqpN8bs81wMjJvwB12VCe7z8Ecok4tB5KWv3To0YhzImw/2JS/S nGjg== X-Gm-Message-State: AOAM530n3J2g7+4Sp452dMNmAceR9mj4cFLdkEc0WCkPKPNNJ3m4GMwZ y4jRLQGTBM9sSO+Nv6GXVR+/zQ== X-Received: by 2002:a9d:3bc4:: with SMTP id k62mr55700otc.318.1614294732828; Thu, 25 Feb 2021 15:12:12 -0800 (PST) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id w30sm1327730oow.48.2021.02.25.15.12.11 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Thu, 25 Feb 2021 15:12:12 -0800 (PST) Date: Thu, 25 Feb 2021 15:12:10 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Andrew Morton cc: Roman Gushchin , Johannes Weiner , Michal Hocko , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] mm: no more EINVAL from /proc/sys/vm/stat_refresh In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Hugh Dickins --- 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