Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp970667pxp; Wed, 9 Mar 2022 17:18:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQ1akwmT0LYhD6tAYdHl+M3nLnE4oLyVR0aOz9TL06tuKIJqNTczkctPGYANYOKFF6qh39 X-Received: by 2002:a17:902:8306:b0:14f:a386:6a44 with SMTP id bd6-20020a170902830600b0014fa3866a44mr2462375plb.140.1646875121214; Wed, 09 Mar 2022 17:18:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646875121; cv=none; d=google.com; s=arc-20160816; b=p7x0wsBq5/3Rx2VDUj8NIDpMf0EUtB730S8vpFXtMOTLicN5WTkncvISVFxDpTkY3l alTMrQk6PcPXBRyNdEoDPHqzBfioeOg1pajz77h3PTEBx/2gowMfBqXtpxPKsGYHmYbj 1hZ1TA3xwK3PRo9nCyFqtH04aLWn2qpwnRUUlxOL15Z1xewqX4+r2odqx3AE5NsNFZbT DGXHUkPNPQKy4Ayc+/8nSj1xp8PQuZCy611scJNQVLf0wTE8CMuTe1azqSZHAnFuQ2ZZ ZvD2PUYQ4V1xRUl8BuZgAOGREC1gTqEFRNlaKyY2v1RlrdUmO4Ry+EPntSbTyEBDBTEz hHmQ== 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:dkim-signature; bh=aNqfcNEZGjceg+UV7MiCwR4m/+vO50KsZYIOCuJEo8c=; b=X1ruWvpoz6XUjmJKXUgv4IF+apktAl+3DVjIpITsA4snI48lyHFO6wUPwB4DkkstSS XIqI7BccvKtf0b6sAjpk/+NOgSCY3mAmjsUoHL1pejS+MBo3JC86fT18S4naFYB5x+sT 52BRPlzZa1lssm6XG/MVp5nvIgDrlv+sUBrQ5QfWCQ0K/rS/s6aXW6+CwkQtBvTOo/nh PlBUbmLm84diGtWoiMO9ayqcBXX4hZD1EaGcjxIvk5wiGoZSsXIngbf3f/aicK0tkLHB X7UjiatnDRLmtkM/e+8P6knW6Oc9NeRSvInTOb+7OVLgUxwFnzl7Y5zpQs4oldirZ/Xn oGaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=36TrIEKd; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a63fb07000000b00374da8c04c3si3329400pgh.422.2022.03.09.17.18.24; Wed, 09 Mar 2022 17:18:41 -0800 (PST) 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=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=36TrIEKd; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237329AbiCITPi (ORCPT + 99 others); Wed, 9 Mar 2022 14:15:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236906AbiCITPh (ORCPT ); Wed, 9 Mar 2022 14:15:37 -0500 Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAB7510DA6E for ; Wed, 9 Mar 2022 11:14:37 -0800 (PST) Received: by mail-qk1-x72d.google.com with SMTP id q4so2561732qki.11 for ; Wed, 09 Mar 2022 11:14:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=aNqfcNEZGjceg+UV7MiCwR4m/+vO50KsZYIOCuJEo8c=; b=36TrIEKdsMjnR7Chc525qevaBESCl1mKL2De489X86GnsLdsf4+mvQ1ZMcNIROMSYO yCGltj6ZHmV85LAY5X414jSI2M/X7EfReqYx80ZB/lbKZ1isvIgHAPVIFhlizprCE4ie Rv93uyCm/H5c37PhSni5oMcTlfdNeprBpFPl7p/siwSBpl+kCtHyK0kbv3lUG8mnKnom GAvEvDWMFHbGqzSwiuB8gkgYut4pT3apuanO8FxlqpXDlX/5tFjUmE2Tq4oH6Yvim8ce dtQ39d8dHPjJiTABTKoBL0erxyMfA2nDOSqWW6viiYnWIOLaybhG0+AxgBbt8+zKuhK8 QhFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=aNqfcNEZGjceg+UV7MiCwR4m/+vO50KsZYIOCuJEo8c=; b=MUKwldYKhDEumROKyUJNtacpaK1Gby7C2VC0JjnI6QW84Iz4+GjbfUmKJhoaTpTznA iQ6ZFIvLp4yI4YKN8GoCbIMjBR/Wfo1aAsI0hMap7pNSm6NC+DRo8VZZnlru9mVfR2VE 77jLN75Bg44YBFyb7JsIZ7G5paHBoHACva+3KrQv94WhzePNNtXjGvZHibEfC608oUrG 6T3FEjUiMWVRvXQNzlHl7mmAa/fhp1IU8dYf5PV1RYHeSWyQY5WeiyBt+y/5/qrRAZmN a6KyCoPeIG2Hv2f/s6yQ0/5AW8LVcY5GBhHdOwFpB9cLiTgMGygb4EqRA0zTF/HywAHZ EfXw== X-Gm-Message-State: AOAM531kJo7lTnzp2+ImHXcJcH3x9jNuhOTE8v0gwZ/xAlaL6A8TjAlo IErWHNn4PTdlIiRtUbGb6gDamw== X-Received: by 2002:a05:620a:2941:b0:67d:243d:3b7d with SMTP id n1-20020a05620a294100b0067d243d3b7dmr802338qkp.46.1646853276922; Wed, 09 Mar 2022 11:14:36 -0800 (PST) Received: from localhost (cpe-98-15-154-102.hvc.res.rr.com. [98.15.154.102]) by smtp.gmail.com with ESMTPSA id n13-20020ac85b4d000000b002de6fe91d2fsm1795510qtw.68.2022.03.09.11.14.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 11:14:36 -0800 (PST) Date: Wed, 9 Mar 2022 14:14:35 -0500 From: Johannes Weiner To: Chengming Zhou Cc: corbet@lwn.net, mingo@redhat.com, peterz@infradead.org, surenb@google.com, ebiggers@google.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, songmuchun@bytedance.com, Martin Steigerwald Subject: Re: [PATCH v2] psi: report zeroes for CPU full at the system level Message-ID: References: <20220309111445.86484-1-zhouchengming@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220309111445.86484-1-zhouchengming@bytedance.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 On Wed, Mar 09, 2022 at 07:14:45PM +0800, Chengming Zhou wrote: > Martin find it confusing when look at the /proc/pressure/cpu output, > and found no hint about that CPU "full" line in psi Documentation. > > % cat /proc/pressure/cpu > some avg10=0.92 avg60=0.91 avg300=0.73 total=933490489 > full avg10=0.22 avg60=0.23 avg300=0.16 total=358783277 > > The PSI_CPU_FULL state is introduced by commit e7fcd7622823 > ("psi: Add PSI_CPU_FULL state"), which mainly for cgroup level, > but also counted at the system level as a side effect. > > Naturally, the FULL state doesn't exist for the CPU resource at > the system level. These "full" numbers can come from CPU idle > schedule latency. For example, t1 is the time when task wakeup > on an idle CPU, t2 is the time when CPU pick and switch to it. > The delta of (t2 - t1) will be in CPU_FULL state. > > Another case all processes can be stalled is when all cgroups > have been throttled at the same time, which unlikely to happen. > > Anyway, CPU_FULL metric is meaningless and confusing at the > system level. So this patch will report zeroes for CPU full > at the system level, and update psi Documentation accordingly. > > Fixes: e7fcd7622823 ("psi: Add PSI_CPU_FULL state") > Reported-by: Martin Steigerwald > Suggested-by: Johannes Weiner > Signed-off-by: Chengming Zhou Acked-by: Johannes Weiner Peter, would you mind picking this up for 5.18? Thanks!