Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp208800pxb; Tue, 7 Sep 2021 22:28:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTgW0WZPXolgeuqqsOu0rAo/PjCwRzSSzxj22entaOdjboKrUeu1Nru9fa5+bXzDVU4RuZ X-Received: by 2002:a05:6e02:184a:: with SMTP id b10mr1586064ilv.90.1631078884272; Tue, 07 Sep 2021 22:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631078884; cv=none; d=google.com; s=arc-20160816; b=Je3SeF+OryqwocaXc+IFa+Xq+HCzCwv4XV8dG17wbDRPAq6Dx7/fyVG2HQxHuPMX29 FsraaLT+MED6u2FlYzY3z2Ei3s0oBnWYm2rvm6ZfthZd9UF4nAGdBzg5rrN9UCUJaXC9 dXdbzkujbRZwX2eMacnrzCkJMbQDRkdon2YgwWcZOP+DDGXmNMvMTDXyCwZjCWYNe91b hUrQvjUzwOJjZpi4ClQUkyywKGOSCp6+QS43fj+Eq8I+EcgvP36zed12M7wCMnM0VPP2 wHPcj0z1dpm8TmO9D0QletcL6phyi5L9J+AuY05kuRMqamL1Ryda9fohhnJQTqoDz+de 226w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=FQ5T0HqJNT9t39aOsQECaxpdxcnOU7H2Z1up+JT0ahA=; b=z6c3Cji/qRKM0wLYJV81vBJ5lsi6i2BOAHgQrea2lq4jDyuknCIOBnSUzzAw1XZdcW /Hqb5KF7SWRFR4gF7WcQKFX1JopyuxfrmBauyBTOQ1+IMU0wdoEQC0h62b2WxYYZ+YzW 5WVYWK+opQdCuVCbSAv+B/6tg9UCHEkOXh5CCgiMTwA5lRgjhmStPAlgACqEjsPELTW+ lLgTVKPsujiuARS3bDBE/VknhsaSxhFEb74vqbuUT43J6zxJEsc51f0EZFJ9J2perWM4 0fqQOb4g8Prerz5KpBxpCiP/gAfMR10FiRJ6JTjd5wRZvu2Hy7era5soRlblw4jOKDUj pwSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KSjeu4V7; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 132si1063048jay.7.2021.09.07.22.27.52; Tue, 07 Sep 2021 22:28:04 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=KSjeu4V7; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243538AbhIHFZ5 (ORCPT + 99 others); Wed, 8 Sep 2021 01:25:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234923AbhIHFZv (ORCPT ); Wed, 8 Sep 2021 01:25:51 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2114CC061575; Tue, 7 Sep 2021 22:24:44 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id w7so1321924pgk.13; Tue, 07 Sep 2021 22:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=FQ5T0HqJNT9t39aOsQECaxpdxcnOU7H2Z1up+JT0ahA=; b=KSjeu4V7QQUimg8NL+XI827Mhtjv4Do5UNgas+FfP5NOXy4uByNlBeEkc6Q9IKqYwu ib9n6iQEA17insu7R6QsJ1F9gho8Q7vQf1jqBt1rnLS/kGv5HYDPpttcHLE7ZsEd3r3+ QO789ukWZ/vxtrPy6/+w3ajKVx/LeDxahaKJHoH8qyVIBbJo8XMGTMZk/uWGTLyRTK/a uKk4dy64QSEkHtB55nMjI1gJH2dmAHHKjoC9GVneHicx5rnZVrJcW88kFs6aSUWAkqeR kRTnheqwrE+HpTMp2Py3QJWDqkXcz7X7pN8mAfPJzslHTckh/VRIkq/K//aQpOa+g14o RxBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=FQ5T0HqJNT9t39aOsQECaxpdxcnOU7H2Z1up+JT0ahA=; b=PxbN7XXVECT16u97gcOPlYY0tRHpYHF+w4ffyYE4PcBkAZ3z2dRGWLE4UR+8t5PLWf VceKya9XQIuWNFWm4HZu4iMl52sqFWIbBXD5fwqigWg4R5YWn2wUFzc3z0hFvDe9AREk /HsvRz6B7SOHRqfMoGHkaHHQtbEb73Xh96aJwOyZuxbVDxBOrOdHLNQhc2QwhoI5MHP3 f9oLssQrJbAohoPtDDYen263rP4kddl/vCJRD/VkgR5YFBVZ8mVS8qknPP2QwZhaj4De VtkPKNNilu3ZpNistgKef2CnIcL7A+wo3AGdYjH4sr3i8X95DFyS6/Nj8C0TXP7tqpzr 5e1w== X-Gm-Message-State: AOAM5303/CCRcO2zJagUZHWUVF8x3nKhyLhAuD+TW0fzloE7Bqk8hMLy fWO52E1Gu0jIPvth1eu9iuU= X-Received: by 2002:a63:4344:: with SMTP id q65mr1973416pga.364.1631078683798; Tue, 07 Sep 2021 22:24:43 -0700 (PDT) Received: from VM-0-3-centos.localdomain ([101.32.213.191]) by smtp.gmail.com with ESMTPSA id k190sm769674pfd.211.2021.09.07.22.24.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Sep 2021 22:24:43 -0700 (PDT) From: brookxu To: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org Cc: vipinsh@google.com, mkoutny@suse.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: [RFC PATCH 3/3] misc_cgroup: remove error log to avoid log flood Date: Wed, 8 Sep 2021 13:24:36 +0800 Message-Id: <86e89df640f2b4a65dd77bdbab8152fa8e8f5bf1.1631077837.git.brookxu@tencent.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <988f340462a1a3c62b7dc2c64ceb89a4c0a00552.1631077837.git.brookxu@tencent.com> References: <988f340462a1a3c62b7dc2c64ceb89a4c0a00552.1631077837.git.brookxu@tencent.com> In-Reply-To: <988f340462a1a3c62b7dc2c64ceb89a4c0a00552.1631077837.git.brookxu@tencent.com> References: <988f340462a1a3c62b7dc2c64ceb89a4c0a00552.1631077837.git.brookxu@tencent.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chunguang Xu In scenarios where containers are frequently created and deleted, a large number of error logs maybe generated. This log provides less information, we can get more detailed failure records through misc.events, misc.events.local and misc.failcnt. From this, perhaps we can remove it. Signed-off-by: Chunguang Xu --- include/linux/misc_cgroup.h | 1 - kernel/cgroup/misc.c | 7 ------- 2 files changed, 8 deletions(-) diff --git a/include/linux/misc_cgroup.h b/include/linux/misc_cgroup.h index 4d630cd3e4bd..838e26149263 100644 --- a/include/linux/misc_cgroup.h +++ b/include/linux/misc_cgroup.h @@ -36,7 +36,6 @@ struct misc_cg; struct misc_res { unsigned long max; atomic_long_t usage; - bool failed; }; /** diff --git a/kernel/cgroup/misc.c b/kernel/cgroup/misc.c index d8f99fd58981..b9c7e488413f 100644 --- a/kernel/cgroup/misc.c +++ b/kernel/cgroup/misc.c @@ -157,13 +157,6 @@ int misc_cg_try_charge(enum misc_res_type type, struct misc_cg *cg, new_usage = atomic_long_add_return(amount, &res->usage); if (new_usage > READ_ONCE(res->max) || new_usage > READ_ONCE(misc_res_capacity[type])) { - if (!res->failed) { - pr_info("cgroup: charge rejected by the misc controller for %s resource in ", - misc_res_name[type]); - pr_cont_cgroup_path(i->css.cgroup); - pr_cont("\n"); - res->failed = true; - } ret = -EBUSY; goto err_charge; } -- 2.30.0