Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp956122ybm; Wed, 27 May 2020 12:07:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZo2a+XKnC7o45v+7H0YeB/lgXO8edg2QDLvteBGzHeAFAB3X0/pT3Bf3m1iezpo1sqtZC X-Received: by 2002:a17:906:6c94:: with SMTP id s20mr7670674ejr.416.1590606459790; Wed, 27 May 2020 12:07:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590606459; cv=none; d=google.com; s=arc-20160816; b=emN2hETVnK19GhVp3cX/z3NqXQSuL2Dy9a1SzanAz8SQuR21JQKB1elrXQ2jVCJqbU fYj9N7OKtBYR+rnDyUGm4hwnJyBiIKUxGflEZLPFA1l9A3yHuR5vmCQgbLthTV41ImhH C1FLXMKSPgU6aQNGbT3cdoxkO+3VHm/GlIUWsbdRyaJzvgn8f+pJIfkCxvnNhE/Rtq3x U8kT7eUm6pCOB+CM9ZIITKOCa00ea3jnNoRrpjAi1xrlgbSA+vWwkbmCeIW9Zh4egN3X +LBnIGwK/3J8bBFqNr5YIlfLI6L+xUCeg6/KoDqbayH7zeEmT/3KLTfSHDEuq9aXblfu nYJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=w8h0j9dH4yYJY4/vfPJevkjnamNxkzeTwIjaJ077JR0=; b=1F4MHplH435gJwUMYyWbnm32M5KS+VX5JLLX0qKyES4qtSNxaf3KZs327N8XmnnhVP ghogCe0u/KUsqimY+mkec4D4zh9KzSYedQo9Ea9ZreOvDpCUDyRSWKVMOaR1lCTGBrMU zkqizXraJlrzb4z8WTSDkIarC+v7/vk8sUQKPl1+EnIJr7/dqtE1SypTntbIPAjigM5z eWiDlacg0dp/QofF2WtWlxtj3EHyEugeC5BNzLfYgAkFoaXW8kPB45VW7+xC8bs0n9CA f+wRHaAsWmTd5lFQic3VxTQyOEh/+VtaapI9lPy1394d6SPUux5spx49VnLk3T+wN7UI klow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="wr9R8e/k"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si2391183eji.455.2020.05.27.12.07.16; Wed, 27 May 2020 12:07:39 -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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="wr9R8e/k"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390835AbgE0QIt (ORCPT + 98 others); Wed, 27 May 2020 12:08:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390822AbgE0QIt (ORCPT ); Wed, 27 May 2020 12:08:49 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35216C03E97D for ; Wed, 27 May 2020 09:08:48 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id x12so19569078qts.9 for ; Wed, 27 May 2020 09:08:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=w8h0j9dH4yYJY4/vfPJevkjnamNxkzeTwIjaJ077JR0=; b=wr9R8e/kt+6YZN51MgGSrgrQKN+iV0+U0w3YDiUZds+tcdj7UMMAPuL2YRAryMtohX VNKbvNrG4bIjPWETOEhzA2c4U/E+X4CVY2EgJ/5ySPQ3LlqJidyQIRGPfTzASiiFnl+S uHmbW0X2xvXgxyXg4abfE1eHxfYdyOP2KHd5y4aqtb2dKO5FWfHDDlvh4G4leXuoDM2X 6k6SD1XYo3XXhbqc/Ijv/Mz+1Egec9v2tRNzcTRPdOlPecpv6ZUeA9Eni8M8qGoWVGYI 25JlCJx5lZcI/qzgwceu2T05yXTObMsf3EZfQHFHZ6afE2C5Lsf9qFojbh1qNErXd8RZ b0/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=w8h0j9dH4yYJY4/vfPJevkjnamNxkzeTwIjaJ077JR0=; b=M71WRA4YM3CJQZGux5zl13T0E4+9sWEVz0ZioH1Egg7nqKSzJW9zZqToUsCdY0ZtHt JK7RuQcu6xNjHPvC/RsghXJ8Kku6+W5VpDkSAY9ZWJ9ZACIwjWYn58KounR44SqNvgO+ BB2zF4r5loh/kvW6V0oCSc7rE6lX/yREJydEZ0Ey0KqLCLidhAME+ZNfeC6LLl3/7cUy /csH1Cr+1fDRdYcxY8MyjKzeBrrNEtlLO8OH2QPJ0O3Ck1CTclzOrCDaPWDVEvbZzr2O fyyEvOxCGnEsIFwP+AeItVyJzqUhCRUIxj7+rFaGw9WwHUVdis1l/QtXUqbEvbvPPkc6 ibpw== X-Gm-Message-State: AOAM530qT2yCbkYhCvYz3H3Fb13vGkEGK2iU22v7iR8W8mvzDzkSHPCI aGoJCn4tbWDrCdA3jPEj0wKdoL+YUw4= X-Received: by 2002:ac8:42ce:: with SMTP id g14mr4989535qtm.117.1590595727478; Wed, 27 May 2020 09:08:47 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:2535]) by smtp.gmail.com with ESMTPSA id f14sm2558579qka.70.2020.05.27.09.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 09:08:46 -0700 (PDT) Date: Wed, 27 May 2020 12:08:21 -0400 From: Johannes Weiner To: Boris Burkov Cc: Tejun Heo , Li Zefan , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH cgroup/for-5.8] cgroup: add cpu.stat file to root cgroup Message-ID: <20200527160821.GC42293@cmpxchg.org> References: <20200526200800.3969430-1-boris@bur.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200526200800.3969430-1-boris@bur.io> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 26, 2020 at 01:08:00PM -0700, Boris Burkov wrote: > Currently, the root cgroup does not have a cpu.stat file. Add one which > is consistent with /proc/stat to capture global cpu statistics that > might not fall under cgroup accounting. > > We haven't done this in the past because the data are already presented > in /proc/stat and we didn't want to add overhead from collecting root > cgroup stats when cgroups are configured, but no cgroups have been > created. > > By keeping the data consistent with /proc/stat, I think we avoid the > first problem, while improving the usability of cgroups stats. > We avoid the second problem by computing the contents of cpu.stat from > existing data collected for /proc/stat anyway. > > Signed-off-by: Boris Burkov > Suggested-by: Tejun Heo Looks good to me, but Boris can you please update Documentation/admin-guide/cgroup-v2.rst as well in this patch? cpu.stat A read-only flat-keyed file which exists on non-root cgroups. Thanks!