From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25AE9C4338F for ; Sat, 14 Aug 2021 01:17:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A4BD610FC for ; Sat, 14 Aug 2021 01:17:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236232AbhHNBR4 (ORCPT ); Fri, 13 Aug 2021 21:17:56 -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-Google-Smtp-Source: ABdhPJyF/J366NM95VqqZS9hAU9iXM6whgFfkFn2eFklnzfQd9bzw800+b6wk9fIaLZ+3i6dK2q4RKG6KO/TZoFQQpw= 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