Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1495854rwo; Wed, 2 Aug 2023 15:21:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlHd1SGxsqE6Lg8fqA5hWVDMjfZ2fdyaronnOjVo+PueOLVQK9cw5Ko7DBH22ZkoF3g0G7t3 X-Received: by 2002:a05:6a20:840b:b0:137:514a:9835 with SMTP id c11-20020a056a20840b00b00137514a9835mr20524827pzd.9.1691014891528; Wed, 02 Aug 2023 15:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691014891; cv=none; d=google.com; s=arc-20160816; b=MufhEfdhVoNApnvtRQ4ym0aGIVez0iAlxDllGUFEqbQkjRGRj5AxcUyNn9hVdY5e5N PrMAyPgFZSXAwQg1ReatjQmTKAhGeynbHlqQeqmeHpwos6/qgjf3+q33PiYcSWGmOPQ1 qg27ZNtiZi6zy67qbwnTGhcPN6TpbFOucZNIwZ7ih1Y8crwvvRuKvORDJFUuo7J60kZp NEKWWig2o+KaE8zZduISFS6Teu3E+kdXY6Vte3HIaf3laW776OEAmrdxNLg7h744lLlk FH03ZqV3DmkUryoCrSbPBOH7AqNqVoiy1AnGc2d8xO/TDGAWUZE6qWi18OyztvLgDzsZ N7Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=dg1csT6sQap9Rjj/9a7I+zdOC12NSKIzfI8UlxG6Z6s=; fh=cpVGWf4RprNftWMU1V+toTwQfpUro6h05Qw1llkB12E=; b=b5P83qYKmvqSP8pmm61YfH/H1m5JkBveUI8sQMe2/12/tNlUD5GemOCNg2jjmYVm9W SO7cCArOskxnkLjH85bEF8+vikwK83v2tN+JMLuLlJhEKVySwUInan1IzYDtLuhdmjNS juAHY79nlmyu5f9oW+Ls/ewMxiABCpgYuWaupjfXGWIijArHSEgsp8oGYYub3a/H543r fNW28Hp1GFh3eJXDmrhT55FY6krOUidZfJvEH3J0C5hjvg1zSnJOGYjjXjvrpIRO7RFr 3HdY9Oi700F8gOPKKWzWdgeaaOXYJuWRZuv7EofpYjMV2ioLXwm5Cr7ywgoyRquxCjSs u2GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=D5od+G8Q; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bu11-20020a056a00410b00b006871a42e1e5si8173753pfb.50.2023.08.02.15.21.19; Wed, 02 Aug 2023 15:21:31 -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=@gmail.com header.s=20221208 header.b=D5od+G8Q; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232933AbjHBVjt (ORCPT + 99 others); Wed, 2 Aug 2023 17:39:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233055AbjHBVjr (ORCPT ); Wed, 2 Aug 2023 17:39:47 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC46726AF; Wed, 2 Aug 2023 14:39:44 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1bc34b32785so2559375ad.3; Wed, 02 Aug 2023 14:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691012384; x=1691617184; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=dg1csT6sQap9Rjj/9a7I+zdOC12NSKIzfI8UlxG6Z6s=; b=D5od+G8Q5l6okpcSGorDH8rVDi8dKCBthkqpfYBIBJlUCMIh9J5CpRVct3JKaQvA1B IOL7SasPOzvfL8/mSWNYFSsfFCQWNM5JxkOGVwAatzOmGjXIBKMplWnSyh0G8xhrJ2BM luNIHpVg2gOIh/cf9EmBsozBHMIWBgjLI8ckR675XgH16xGIs4qLRva01KuoNNRPl4kZ oOcthTE0Bt20SOx7bSL00SsleLB3chZI++TfTdJDvk80Z475KNWTj+/NlOOKhwdz6wo5 yYKiBWxas6X63T8Vks8qHaljufFTCxBvS8BmXseG1AXraZZ6CUv8U3WDqygStNlRZWxa Z8rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691012384; x=1691617184; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dg1csT6sQap9Rjj/9a7I+zdOC12NSKIzfI8UlxG6Z6s=; b=INJv5mVVo3QZ6kfZCSyR1VsMj/MxF+CH7K0N710VUQ4Y7vau9UCzTclVKxab4ii3JK /cyxy8gnQdmGaTQYwGW0MhSa3/2kgEknoYXRf+Mw+AwyjU8wmJ2mS2KjflduK75wn9gO dqLJAvvol+kkdDz30RTaSfAfCfxMegMc+5Ew7+i6xK8d3irXmSNnLzl97QOQpbgouCpD lX6nJoU0mab7FKbKox2v3tUzroB943C45JStVvzOGCiyAUHcbok5HvxIbD3/n0VY1a9W TZL9MLVO3lT7YjnXxxusNZmgd2MONLzdl9aY/665lunOqTOwEYXD+zHIpxh8uzM4zx3A Cmcg== X-Gm-Message-State: ABy/qLbpWAn9Etgw6wGvC3f7RqIzcfzyO/WDoxd7vv/0Z1M9Fs19mGOw GNfP47+LsnAZ735Sru372Wk= X-Received: by 2002:a17:902:e841:b0:1bb:ee1b:3cdf with SMTP id t1-20020a170902e84100b001bbee1b3cdfmr16535575plg.67.1691012383533; Wed, 02 Aug 2023 14:39:43 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:9d5d]) by smtp.gmail.com with ESMTPSA id v11-20020a1709028d8b00b001bb99e188fcsm12850055plo.194.2023.08.02.14.39.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 14:39:43 -0700 (PDT) Sender: Tejun Heo Date: Wed, 2 Aug 2023 11:39:41 -1000 From: Tejun Heo To: Hao Jia Cc: lizefan.x@bytedance.com, hannes@cmpxchg.org, mkoutny@suse.com, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [External] Re: [PATCH] cgroup/rstat: record the cumulative per-cpu time of cgroup and its descendants Message-ID: References: <20230717093612.40846-1-jiahao.os@bytedance.com> <2655026d-6ae4-c14c-95b0-4177eefa434f@bytedance.com> <3d2b68bf-9f40-c779-dcfd-4cf9939edecc@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hello, On Thu, Jul 27, 2023 at 07:44:28AM -1000, Tejun Heo wrote: > Oh yeah, I do. I'm just thinking whether we also want to expose that in the > cgroupfs. We are currently not showing anything per-cpu and the output > formatting gets nasty with a huge number of CPUs, so maybe that's not going > to work out all that well. Anyways, I'll get back to you next week. I couldn't come up with an answer. Let's go ahead with adding the field but can you please do the followings? * Name it to something like subtree_bstat instead of cumul_bstat. The counters are all cumulative. * Are you sure the upward propagation logic is correct? It's calculating global delta and then propagating to the per-cpu delta of the parent. Is that correct because the two delta calculations always end up the same? * Please add a comment explaining that the field is not currently used outside of being read from bpf / drgn and what not and that we're still trying to determine how to expose that in the cgroupfs interface. Thanks. -- tejun