Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2063079pxb; Fri, 17 Sep 2021 00:59:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcTIHRo8ubNVz9skH0nph4h/QJtVjL5hypweoXTacOD0GzO1xiglDJMdvU0vY1UIzRKZYr X-Received: by 2002:a17:906:d057:: with SMTP id bo23mr11106822ejb.208.1631865550653; Fri, 17 Sep 2021 00:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631865550; cv=none; d=google.com; s=arc-20160816; b=CoiroGKpV19Ms85khoY/5vXBPZIE07xqcMQ23d++NSgNwxf+X6BZyDVfdhUi/F/ZF5 YsoRvFte3sLS71VeOFF3hZdQ+oxj+AUXGQsQCRRgN6xbFVcyCeFBj9rTju2jkpP0IKEj A/hnmYtjDPoPgOnWZ0bby3E27t/w0yCE/d4rmQskR37ENna0kCsu8ICyUpe35hcqhE9F ArvCL8DmlYnrPYdm7Rk0+TImItYX4MkVBlxMRtNz5T7cZsrLTItEnic/dVqbds5OCgWE lZyfaZsrtmK1zj8sL381q6wov2FMGdu7ZyfHRfrRWaED+Z0xiCRc3PkfNledmFEvnQAW gU1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fbJGgwQpdImuKGYvZ0hVx47RK9ar0QLFewfGibiPGXE=; b=sQLpxGJJ0gE1mIxIkwaB30tPCXbjt4ouK1uQIQEni9TgkUwIW34z9dTAWiTEG7xjTX 2d2Xb/pZe7IojLXQxlqGU9O4tmva066l5vn5w1RGkCMFX8W+xOpBW/mB3r0imkOvP/iy jMjfauajICmMsY8y/KZb0nYM8dPkj3ETISGs3mwufZNWopR3rG1vnu+hZy2IceHExF14 XGYQwvUJ7cV57AEpPR/l84FbSxrd2vdsVd9mT/09zFaK9tHxOIzs7PMrXfFQz6szlLrL Z6BUmCWlNIO3ujOF0ehw1RMX3zle9W35Ka2jN6v+tZ4mf7qCy5bBAj86TNkX2ZRs5oly srzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=IUjJu8eX; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si5903199ejn.242.2021.09.17.00.58.42; Fri, 17 Sep 2021 00:59:10 -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=@suse.com header.s=susede1 header.b=IUjJu8eX; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346009AbhIPSBG (ORCPT + 99 others); Thu, 16 Sep 2021 14:01:06 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:41494 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245747AbhIPR6f (ORCPT ); Thu, 16 Sep 2021 13:58:35 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id EDD021FF07; Thu, 16 Sep 2021 17:57:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1631815032; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fbJGgwQpdImuKGYvZ0hVx47RK9ar0QLFewfGibiPGXE=; b=IUjJu8eXSDOvstCBzNqJfVDXURIGXW++ljRJE7t4Ed/NWRYOrUX0uf0TeY0spExSVB/OIJ K5+Iokl4j6nB+4uI34smI8VlI2T28kH8QyaG7RJnoTkoSGejLv/EPnIKYJRMmMZgaHxE+K Iyiy/HI5tEorxpOyFkuznNjT9XPUGW0= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CD48013D5A; Thu, 16 Sep 2021 17:57:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yfQTMXiFQ2HWcQAAMHmgww (envelope-from ); Thu, 16 Sep 2021 17:57:12 +0000 Date: Thu, 16 Sep 2021 19:57:11 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: brookxu Cc: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org, vipinsh@google.com, corbet@lwn.net, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v3 2/3] misc_cgroup: remove error log to avoid log flood Message-ID: <20210916175711.GA12643@blackbody.suse.cz> References: <3834f917d50a6f19402e179e917ef6a9dde5f64a.1631671936.git.brookxu@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 15, 2021 at 10:18:50AM +0800, brookxu wrote: > 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 info from misc.events. IIUC, the log provides equal information (with persistence), no? > diff --git a/kernel/cgroup/misc.c b/kernel/cgroup/misc.c > index 4b2b492..fe3e8a0 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; > - } As I argued previously, reporting this as "in" `i` cgroup instead of `cg` is not that useful and equivalent to the misc.events:*.max now, so the drop is appropriate. The change/patch is OK, Reviewed-by: Michal Koutn? The commit message might be fixed (if you agree with remark).