Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3446199iog; Mon, 27 Jun 2022 16:38:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u/74joQmWFM9N5YCuHgRmA7EAJWnG8yQd29MuB+IYfEN4fJpNOAfFd/sKf92b9m+akauQv X-Received: by 2002:a63:b70a:0:b0:40c:40b2:f001 with SMTP id t10-20020a63b70a000000b0040c40b2f001mr14705613pgf.460.1656373082930; Mon, 27 Jun 2022 16:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656373082; cv=none; d=google.com; s=arc-20160816; b=tV8/AIKgIyF7W8Ne3vghAZ7duhEVpY4cW+d18YIAK8c1JKunp4j8OS2QlA9E9ojC0Y qph4rdAlCZosB73umMOjvvb5VIGx9095Kg/yOyCNtXZsid5NQnu9HIos+KEqRzfez4jE +/PhG6dPekX9aiC5BXvSoqqcXOhAtxrpp9TLXEZCEPewRj60tiDeWKR8PXrmeaUQvunS qqb7AD6XnAImu9EA0zNz/E8q8PUswZ77arcgxee7uwjTyu4aMFbfxYSWJ2HLo3ewfit0 6QyAKUj1Q7O2xxVWa7xZiCzBW8WCYNLmkSg8qznP0f8kiA6mRLOuCxBG9eqqDhPxybfW WMGA== 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=NdNzOeC3gRAa6rQF9qXJXPeMWI5VIg2SD/sfJr2c6tA=; b=oE/kO0DB2EEk1YbtBkssr+g17DogxCFMHT+Kwib+OMCiOt7ABn+yVvII5yPSj7OPgv mqVrCCNqPIFGXaejz+L9PUu6FxfEKj7mJU0F26lkrtBSC17zKXyBMhqTsg2yi2++zA9C NwdqOhuFqCMvckvepQ8N7UGgeLIJRYGa0Vt82H4vdDK2dEjQufhDBVPF0mPwhgFCL3IB XIpZyNiYFjhvht5tubUSiyyZE1Kr6ay/ibVEqTa4UInmqnRms1KipSYenYNXpIqSn1Ld szCvP5gnQ4zArGtTv2CTSQJyeV7ArC6QnwBmxWtBGNhAvAihZX/Fxr3YaY6z8pm5xJGB YLkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=fndGvdsS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a14-20020a170902ecce00b00163be809240si18528618plh.302.2022.06.27.16.37.51; Mon, 27 Jun 2022 16:38:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=fndGvdsS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S242707AbiF0Wfk (ORCPT + 99 others); Mon, 27 Jun 2022 18:35:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242746AbiF0Wfh (ORCPT ); Mon, 27 Jun 2022 18:35:37 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4AA0205DB for ; Mon, 27 Jun 2022 15:35:33 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id o19so12634225ybg.2 for ; Mon, 27 Jun 2022 15:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NdNzOeC3gRAa6rQF9qXJXPeMWI5VIg2SD/sfJr2c6tA=; b=fndGvdsS8pS3e9PK/GsoWulDrrDfD65+qLb7s4ZAP7aEzLB3M4Ub+GM0eBmbcASe3t oeeUNMR4hdV8S21dh4n0gq9QnIy1dtddf/t5Qj6Mp0fvz2h7hK7169cSIPbbTTb4qzzP uKJUPw80qKPszdXqfwaKIB/iBGhknbU5vjqx35GwhLZrNvkSrx5EujvV1IsoOieg1lWt VaFll4bpbtZr/ZnQo1IQ2Yhsy5J5GXb2NuNtHE5CVtdSyDGuBUBQykqnuOGK2nLY5Qdd 0K60i7zQaGacDXD4FfIWtsr0aJ/D6XU8oJzs9wB5PXHPDsj1CDGRNJemzC1wPdjFRNNc 0oZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NdNzOeC3gRAa6rQF9qXJXPeMWI5VIg2SD/sfJr2c6tA=; b=DTSMXSF16/TDvZzi5SO7vgGWYcZWmSLSDF88ABoKHFZqvcCu0EjILW07/Yv6C9Umh0 SSMZ4gohsttzTfggKFdNUkkdO7MaoQ0xkcH6+9XNLlHtUBLouFMF9rDSGLt77P0ZG1// SwcagVMDqEg3pAeuSzumLBmP+sMqTtDZwj0wAghlB4alzEITb6mcCE1mUHT7flqn8Ta0 ji8Q7WM3rRLnU2qXa8uAXZdCqeQYuyRHezPsox+MxPWaqak3gpgSbCjuhmNUtnVZq6cB L29sqC7OcgW4xcm0PivKjhZaUI5HN2tXBGJV+1WQLQUhUKpcz81KUAp1AlYRyGBcz76l GZUA== X-Gm-Message-State: AJIora/ae9AHotiX6acsyVAKxYC4Bck9B4Je9b6xpBGzyHY5xudqe6Zh T9NkobmCAK443Ccd/uo5wOr+RgGrMooXL675rY6r2Q== X-Received: by 2002:a25:cc89:0:b0:66c:990b:3638 with SMTP id l131-20020a25cc89000000b0066c990b3638mr12918052ybf.464.1656369332755; Mon, 27 Jun 2022 15:35:32 -0700 (PDT) MIME-Version: 1.0 References: <20220621234443.3506529-1-joshdon@google.com> In-Reply-To: From: Josh Don Date: Mon, 27 Jun 2022 15:35:21 -0700 Message-ID: Subject: Re: [PATCH v3] sched/core: add forced idle accounting for cgroups To: Tejun Heo Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel , Cruz Zhao Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks Tejun, On Mon, Jun 27, 2022 at 2:16 AM Tejun Heo wrote: > > Hello, > > On Tue, Jun 21, 2022 at 04:44:43PM -0700, Josh Don wrote: > > 4feee7d1260 previously added per-task forced idle accounting. This patch > > extends this to also include cgroups. > > > > rstat is used for cgroup accounting, except for the root, which uses > > kcpustat in order to bypass the need for doing an rstat flush when > > reading root stats. > > > > Only cgroup v2 is supported. Similar to the task accounting, the cgroup > > accounting requires that schedstats is enabled. > > Generally looks fine from cgroup side. One nitpick follow. > > > + seq_printf(seq, "forceidle_usec %llu\n", forceidle_time); > > Would it make sense to namespace the name to reflect the fact that > this is tied to core scheduling? e.g. something like > core.force_idle_usec (and yeah, underscore between words, please). I > kinda hate that the feature is named "core". The word is so > overloaded. Sure, although a namespace of "core_sched" would be a bit clearer, since as you point out "core" is pretty overloaded :) Lack of underscore for forceidle was to be consistent with "core_forceidle_sum" being dumped from /proc/pid/sched, but I'm fine with it either way. So, core_sched.force_idle_usec ? > > Thanks. > > -- > tejun