Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2881604pxb; Tue, 24 Aug 2021 09:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYpnuDk4CpevNKVbhZFF0JByOgHdgXAHFULB9Q/tVwdCX+pIyB7QEljOHyiF8rX91M176A X-Received: by 2002:a92:cccf:: with SMTP id u15mr29045157ilq.144.1629823532526; Tue, 24 Aug 2021 09:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629823532; cv=none; d=google.com; s=arc-20160816; b=M/BHqGbFGPLn1O11H53F1DaztNmbSxu+jijkbYCrHnorKhBsc8x6FKJLGAM9Iln3p9 +HFfQODkL9LZTHZWDwql4lhnc+YecmdhMa3KXgLYmgLonNZRVCH4BTamTppPmDFayebO hz8ABlkdXXz9/aQUtCT8J6Fxhfbkg3832onDnG99W1nORvhLKqqEcc3SCfK0K3d3UshH t6S4Wo/xVqYWwP+BArWChD28EAKrDGKmIc/+U4Cca35QYryMH/B21oE+oqj+Fm2Dmyor i1TLvYvRTBDBqI8Gua7va2QTHOZqnliknNcAlE1DavjLQW+PvQSgpIJiJU6oCrZK6RyK 8LsA== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Z2MS98YdJwtJG8FeEq/L2x2vYouQos57GNWyqg6QJyA=; b=G+R0lNeUcnl+dIQT0gOIgcfmPgdsOzr6xkqi7Ffv8dnreXdmN1vyUBguJu5i7rsU9o vNueidAQLE/tsQxqC8cCXM10cbhX4079SV6U5bjhkJxu/NFGT5oj0RVO7ahAoewmTKKJ rCNpj/OJHegHxfsWvM1PlW/dZtFWAbH0wZMrXKIpgsosP8Z+2PEVKnxit9uCko3uh1N8 TgCsfuX4DKVqPlAoUHWswVrvgkkt1fwvMZIAUzQ1XLBuy5kQIPxX9t/ITnrbWRILucS4 Ijk9h43p7m7FiECLQLVJLF2EoB60WHR7db+HbPk6Y7j4EWhriM5TySAes7uvRYqQm1UD Y7rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=hglYmTZ0; 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 z22si17743102jaq.37.2021.08.24.09.45.19; Tue, 24 Aug 2021 09:45:32 -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=hglYmTZ0; 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 S231361AbhHXQpL (ORCPT + 99 others); Tue, 24 Aug 2021 12:45:11 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:50060 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbhHXQpK (ORCPT ); Tue, 24 Aug 2021 12:45:10 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 78C621FDB4; Tue, 24 Aug 2021 16:44:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1629823464; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Z2MS98YdJwtJG8FeEq/L2x2vYouQos57GNWyqg6QJyA=; b=hglYmTZ0ibs1kipNcDW5ppNCm78oIvq31YUQTGxYE8JL/H3Wp8stjoxc6XSfbVqbCPZWyt dASzpF/UoW3GZDFju1KQQEVfGEgc/19+HZjo10yyqbLoV3XhjN/WiOCz7eUY3CydwdrSeP hjtEnkPekDuCd/Wzr5eXZa4izsSh76k= Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 522C113A5B; Tue, 24 Aug 2021 16:44:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id iTNtE+ghJWG1XQAAGKfGzw (envelope-from ); Tue, 24 Aug 2021 16:44:24 +0000 Date: Tue, 24 Aug 2021 18:44:23 +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, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH v2] misc_cgroup: use a counter to count the number of failures Message-ID: <20210824164423.GA11859@blackbody.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On Sat, Aug 14, 2021 at 08:15:16AM +0800, brookxu wrote: > 1. If a large number of containers are created and deleted, > there will be a lot of error logs. > 2. According to an error log, we cannot better understand > the actual pressure of resources. > > Therefore, perhaps we should use a failcnt counter to count > the number of failures, so that we can easily understand the > actual pressure of resources and avoid too many error log.. This is an understandable use case and generally the implementation via the counter is good as well. However, the non-hierarchical failcnt interface looks like v1ism to me (I think new features should come with v2 first in mind). What about exposing this in misc.events file with max.$res_name entries? Or if the hierarchical reporting is unnecessary now, there can be just misc.events.local for starters. (That reminds me the forgotten pids.events[.local] rework [1], oops.) Michal https://lore.kernel.org/lkml/20191128172612.10259-1-mkoutny@suse.com/#t