Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp1247214pxb; Fri, 13 Aug 2021 18:18:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2o5jvI5Mrt+nkEly0IRI1qWOeBMk1REta3APqlvNlxnul5C+zBgnysP4TYLcwgblimx0c X-Received: by 2002:a92:7d08:: with SMTP id y8mr3709707ilc.111.1628903902443; Fri, 13 Aug 2021 18:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628903902; cv=none; d=google.com; s=arc-20160816; b=fWei8iQinuw5NaysovKKozkvXDIyUEdbx/MJyqa0yJEuBoNwK/rqnD5jttNlfIYfmm LmH1WMFEmjTlZhsutviKxqJB/fySAeRpJbHTzQet3tLidfiYVNgoI+1EJ7FBHdH9AhuO sibtd0EZnrwQ1neJpX/r3auPKSZU1XvXLSnY4ghlgNOZmASYwuwY8ebsf3HiUU5Wu9hy 4GYHecT1fKYgtGMK9i12j8kwahrDRVSgqihWyp7SZH8u9kAZ3jlNjS3GcghWXqiH4g3H MmiKs03OXL+A87MPZ2laPOMidlywAi38GcTXlsd9IGx96zvII0Q0Fq3gR7kTPFSNJgDK Dsmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=y5gPul7eijlOt8GM4HLCxObdd/V4u2qacMdjonsEqZ0=; b=xm/ZLKK6fEhRZi/9MVCa4Zd3lYF7k36oBKOQvCWr674nbX6w20+vT4dTdyei0pQcu8 2kHZ3J3K8bBBKCxrg1s5cF3+asllGJEy/wbO3u0m1TznrFjdz24vW5OQ8i/yUDm/1aTP QXvnLbNZJhLFK4ue+p3FW4EFifm5e91IdKvMkCT5vmqb+H6voOu8E9+5V20+a+GAw1UZ 1M5Rmpj2z7OQBSbYehU2b7KivmAP4bKoeAErIybLPfXtV+GLtuL3zk0du0e6hsUw/+82 FNPWY7CCuHu4oEqrD/1oaBlgdNFYf9ykuSORN0ESfZ3DOrhQ6Syrc1VJP8N42TADs5kO g6hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=tgcGAsU2; 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 g1si2770242ile.140.2021.08.13.18.18.10; Fri, 13 Aug 2021 18:18:22 -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=@google.com header.s=20161025 header.b=tgcGAsU2; 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 S236200AbhHNBRz (ORCPT + 99 others); Fri, 13 Aug 2021 21:17:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236141AbhHNBRz (ORCPT ); Fri, 13 Aug 2021 21:17:55 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA413C0617AD for ; Fri, 13 Aug 2021 18:17:27 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id y7so18268772ljp.3 for ; Fri, 13 Aug 2021 18:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y5gPul7eijlOt8GM4HLCxObdd/V4u2qacMdjonsEqZ0=; b=tgcGAsU2GoR85//UtKVxI/9WfKebiunMzpWmqEY05kDZCGgdmO2+r7/fONX6wDxE7k 4u5AidzGRRhww0AmSAlwvIvgPBeKH9Zld3SF3zxzGsdkhCmAf0Y7A9FHPyv9sDZ1X9+a A84KVQ9K8M0WnVKfuW5zkj88UblBELlVWWzzO3cN56OK4DHQrPOKUr5AzTZyKo0YseFF VJETA+asdK95vnpVVIbcCNadT3mxz6f/HqVtHGiX/713oB62TxhsTaXGs905sVHhr7zU o/21RxGxC7bzy22JU1AgS4fHfyNDA/RAod0B5+ldUOOj0U3d4PHheMxvp6iwP1tD5Jjs ZpuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y5gPul7eijlOt8GM4HLCxObdd/V4u2qacMdjonsEqZ0=; b=WMZTmzCTwpDZhxz6+pKXH4rblkdcc9xaJWQJw1GSq9oa8+tOMqYxwx0fPaSa7zl7Qj IJLcGnz5wyYIjITpAlaED5dG77oPEOuxOLUY/lL/jChSUFG/atw2hRMKhSjSprWB6iJW LflNXTMgwZDQmoOULnxHdJCrTwGjzHjH4qNTi2gXx9wr4EoDp45BtEr/+w1GZ7SV/Eog fv3yIOMSvpiL/aKLSAhubZwDjEl3AVGLiLPlT/5ZKXCneP/fHEIi0jBtTu/XUvCRkGnT 8r2AgX2kyufc0Ky7ZJ/e7ygGkvrebJfce7NVpd6bgQOXUKI73oQfqVNj57HS6fe7FV0m KrKw== X-Gm-Message-State: AOAM532vfmUgYiABJGBVjpR1mCHEsf7jSbf/a9S7eoUL/BbzL1duWNil OO6ijslEq30JGaJy61NJb1RBbRl8ucbMNUCq2jaxFw== X-Received: by 2002:a2e:9e04:: with SMTP id e4mr3628772ljk.431.1628903845596; Fri, 13 Aug 2021 18:17:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Vipin Sharma Date: Fri, 13 Aug 2021 18:16:49 -0700 Message-ID: Subject: Re: [PATCH v2] misc_cgroup: use a counter to count the number of failures To: brookxu Cc: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 13, 2021 at 5:15 PM brookxu wrote: > > From: Chunguang Xu > > For a container, we only print an error log when the resource > charge fails. There may be some problems here: > > 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.. > > v2: rename failcnt to nr_fails. > > Signed-off-by: Chunguang Xu > --- > include/linux/misc_cgroup.h | 4 ++-- > kernel/cgroup/misc.c | 37 ++++++++++++++++++++++++++++++------- > 2 files changed, 32 insertions(+), 9 deletions(-) > Acked-by: Vipin Sharma