Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1716624ioo; Mon, 23 May 2022 01:19:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIXEbOCXL5shSVe9iCd1hKytLv3GiAnAHL/JrbOE17Rs/Dj0yHUB4M+Ga/J/bIQX3s1GZ7 X-Received: by 2002:a17:903:153:b0:161:eaba:5b2a with SMTP id r19-20020a170903015300b00161eaba5b2amr17217087plc.30.1653293963974; Mon, 23 May 2022 01:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653293963; cv=none; d=google.com; s=arc-20160816; b=qk8KhOg9N8W3GL9nmgeZjYWVavev8QXUGooPYHaW4c8Iq6xfYEvF3swdVGoBTPOyZY FRILvDuRz/eWfpNQ/NJPct8KiCNWYU5Ze8yfiIgXxtUmCQqROQV5MZrYwU1/fDsACmcJ gCotKCYSj2s0Ratw2wGRW17C58APXRi1v0V5YW+CAy73lG3HIbIo/qpWqWealGEWuiTY 0sE4IDE6EDCWdz4zd3uNuVFmW1MBAv0UNqd9Fayt62GoTY23BX82FaCZPhaxaj7zbl+L /T960xlJimeHAHzd1ZdWPZUG5HvE07zhMHRcMIL2fOEDozG8rfvDDwvPbKgW7nqKtTFZ Lvuw== 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=mtXHfcEJa6gaynzn3mJFjpr2Kt1NnYIFnTGWwVddj24=; b=HF6fy/QgMR8CEYpBk6lV3iN2vWzAdZzGJMWNOdaFlyBLZu4Al9UU7Ke6D1YI9fq8Ax YxDXy42njTk6fLeEDaHcPBg7HJNzA7mIaLsZKQfFlCPIkj5dzf0Wd3bh9XIKvGbLUqBl ofO1KRbBGmrt81NY2xQILbbxK5rsvlwzz90wJjjDUpCPDG1GFSwdVCwl787h5b/Q9cTz F23a5BSTUlVzs21OOfiSq9iLaBzMsxuiudoDyBT10Kcx3T6HuEcSHBeK2P5JmfTbF89K FJbho09nvhw9QuJbaeipvLDz74TSxLikmxNOFLr9Fv5e+yygRDcJ8gDe5c4QUcwlc0vt QtLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Nb93/h3u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z16-20020a056a00241000b0050dec7ee78dsi13815142pfh.43.2022.05.23.01.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 01:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Nb93/h3u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 79A1448386; Mon, 23 May 2022 00:22:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350240AbiETSnz (ORCPT + 99 others); Fri, 20 May 2022 14:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353027AbiETSnv (ORCPT ); Fri, 20 May 2022 14:43:51 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B28D814A6 for ; Fri, 20 May 2022 11:43:50 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id l20-20020a17090a409400b001dd2a9d555bso8586404pjg.0 for ; Fri, 20 May 2022 11:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mtXHfcEJa6gaynzn3mJFjpr2Kt1NnYIFnTGWwVddj24=; b=Nb93/h3uoEP/gk3DQInvuup6FkW7I8/YtUj4+LqGyWSECATnwUI3lw2UaIZSqJEXM8 AOwGBZxmmup2nbdQiw72KRcUEMqJ2WSZ3ivPDcm9uB1O7y2pXlBB1W1uz7x44DbeIkzn y9cIaUSIHB8YDHQloQ4OsBxRMpQb9iT0prOYZdn7nkoy+wDZh2W0guko1qjiPmQ1c5Zi dOcrBdf9IlN1E61bxedvV8qlmAhH+8CvyGhdRoJsIubrN6KcxZAyFJE9ZfxU9ojezeVP kVyoSD3RpCoUlUltlkb9QyLq4OzjGv2SlfBdvw4lsHxWHUIKXUvqXktuvEp2oVxDAs5F cK/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=mtXHfcEJa6gaynzn3mJFjpr2Kt1NnYIFnTGWwVddj24=; b=mCJkEu6g68hkBrw8QPfTUE7caV60EdSbf6YZEH2Iip6fdSvQt7tRsJuRQ2oNyO4+Jx Bc0CFiAp3qbU0y3AXY7JKti8GDnszJVVqXXEEL8fMq5jxcwt8pznVBcHp+YdCBvVtExZ 1rgu2qa6414TmWy9xTV2OXGX0d1Fz7Q1pIo/jRrls6IaL9tLogIX9eG56WCXiQiOxF+2 AoS2poE9nvWxTwQ8kKy9Pr+ZCBpIibKYRjAovx0pBtjyRzLUbxpJqO4GmQmO2V29zDOf VyTuxMXX/wuygwLiJHRc/4LesjNj7DPSfVhvUnhJ5D7bjETn9nKA8TlUKp6q3F6DJ3IS HUHA== X-Gm-Message-State: AOAM531uPS6+LiF33OGKNNHolCE9kC7sSsXyiXAOIW07UHOlVTGP5/ri 9GsevOICMJ0/gjJaEQnrHVI= X-Received: by 2002:a17:90a:b88:b0:1df:2b03:20c with SMTP id 8-20020a17090a0b8800b001df2b03020cmr12398664pjr.46.1653072229733; Fri, 20 May 2022 11:43:49 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::4:1761]) by smtp.gmail.com with ESMTPSA id w6-20020a6556c6000000b003db7de758besm103926pgs.5.2022.05.20.11.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 11:43:49 -0700 (PDT) Sender: Tejun Heo Date: Fri, 20 May 2022 08:43:47 -1000 From: Tejun Heo To: Josh Don 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 Subject: Re: [PATCH] sched/core: add forced idle accounting for cgroups Message-ID: References: <20220513005427.2507335-1-joshdon@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, 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, Sorry about late reply and thanks for the ping. I missed this one. On Fri, May 13, 2022 at 12:23:16PM -0700, Josh Don wrote: > Yea, that's right, this doesn't require the cpu controller to be > enabled. Are you suggesting to add a new field to cgroup_base_stat? Yes, that's what I meant. I think it'd fit there better. > One other weird artifact of collecting forceidle time is that a cpu > may account it on behalf of its hyperthread sibling. Currently, the > core rstat code always accounts to the current cpu's percpu rstat > field. I can add an accounting function to support writes to a > different cpu's field, in order to make sure that the per-cpu totals > are correct (the forceidle accounting code holds rq->__lock, which > protects all HT siblings of a core). percpu totals aren't currently > exported in cgroup v2, but this is useful information that we'll > consume, so it would be nice to keep it accurate. Sure, as long as it doesn't incur overhead when not used. Thanks. -- tejun