Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp464051lqi; Thu, 7 Mar 2024 02:31:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUjq0SNIn9gJFvh+w91Qrc5MnHQL3wDEBObWbGcwzaY2W0Qx8uS//luYwBEjgJDGbTLZohkw1OeFpessIjsG+yK6rTiEjHTjkHOGhJhVQ== X-Google-Smtp-Source: AGHT+IGri1ag3DjAPv6y2Eucylx0c4jihEfy1/O4epuzzyU5iAkvFGFIziSNeKJq0SYfhQdC5J6x X-Received: by 2002:a17:902:650b:b0:1db:bec6:9147 with SMTP id b11-20020a170902650b00b001dbbec69147mr6397869plk.44.1709807492943; Thu, 07 Mar 2024 02:31:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709807492; cv=pass; d=google.com; s=arc-20160816; b=XkTujeB94sF8/YU14Zn11nSCNGaPdhyKsRDeatHt3d+QNW9SQanyn6+uUFTqGQyaqx MoMbcjQ0bof70A7Ln2ww9601u6+RfEowZwPMv3ckbc3pGFT8w1KdnnnSkDRTJ2FWnhzB 0rxKJAsn8rl0/r3t36zSM6wbp55+WISBeVGjHw490/UZelnVzJxrrAAsYJf/KHE0p97j JXrUsEy57aon+MiXBgn9F/Jv2JT/C3oeOffNzes/M0Lv9s2ntqDO0byxyuLMkOHcwOEe xW6rxEkC//v3WhRrKdtCq1JYGy6FQG3W/XRXDZnCChZlkLcZcY/HPPcaZB7/CGm3ATPT yEEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=k3WrWoGnPi44WJ5pSTMFfxRPEbDLJx7jgfOpgLgyAJA=; fh=tGrxM1HAvFfzll2aqpT/Z2OvxlXngbzQYYACovspHYU=; b=YujnzKPDHQJv0cMsKeFSgbAdhJ52XtLSSsspbAxErAg3DSw3GA5FYqKy9l2Tl6uK1J MczqJJhQWq4+pzqO9VMCqAUiOKoJdA5FltOxDd/34KsIMsUUSuus82jvlDkTmgqxwFtN OgFaxMzBHZNItpmXYxyDc/i0b26Dj7TQ5aR5J7kfqDot7rJ1lGGmUfQLVgmnXkYrjgAv K9cMUS1+7ZQSL4x4WOoiXib6TqYI2ajJ8A4zbI2TEmofwSBiaTy5bW/lF9bWz96irFan M/rI4HunWvaO0+AaoR5ZNkHESiWGL/CSe4EpZnTZq6Tqhw0hxBSC1qf0kTtic9TOdBZI C2wA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=JWcRK8NQ; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-95323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u4-20020a17090341c400b001dcfaf4fecfsi9501627ple.100.2024.03.07.02.31.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 02:31:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=JWcRK8NQ; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-95323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3AE3BB23D3F for ; Thu, 7 Mar 2024 10:21:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C729D83CBB; Thu, 7 Mar 2024 10:20:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="JWcRK8NQ" Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A93F6127B73; Thu, 7 Mar 2024 10:20:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.113 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709806811; cv=none; b=nNjE8/0322ImUezEi5dXnjyEHYhu60Uqp9dlSupPQlejHFXK4AXWcS5h0REqshpO7ju9gGvyFOUOL+aP6eJwKcAE5sS7KP1u9sVt+UK2VkVqYEi2vKdLRyRE0bBvzy6mKR1PpJvdEeTfly+KpuY8PW3tSr0mz96xgKOtEBd4EOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709806811; c=relaxed/simple; bh=sFthArt/S9De8yl4FLLf4O2ocSVPkaTCw6xLaMhpirc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Qx5G5XN3kXjV5bZXUymublCLbJp48qZMgXatQ+EBYxnv6NjM48Jt4Ie9JnJOUsnEIiN4D4qm5BzKw+4oUXj65mpMNKwIOuSSnZjIx1bg8qyVuh6AYEGW0ss0TXyn6EZnKCf7787YFs5yn9hxZXQWdyPG26acG1JiW1icP8SDUJk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=JWcRK8NQ; arc=none smtp.client-ip=115.124.30.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1709806802; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=k3WrWoGnPi44WJ5pSTMFfxRPEbDLJx7jgfOpgLgyAJA=; b=JWcRK8NQ5tsCPRuIUtFk4B7IZdnmMaP5F7VLYzSjxecZL1TctF6VXqV0J+Pu4EssysaYX3dh2KJBy0hDD8lEy/rrQNzmEHavK1S3V2pjj0dq43S468IuoJCalnrEr+HRLNknlh7xy2xobMgFNjT07mg5TjJ19SWPfyi5sM/grVM= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=cruzzhao@linux.alibaba.com;NM=1;PH=DS;RN=15;SR=0;TI=SMTPD_---0W2-P34F_1709806800; Received: from localhost.localdomain(mailfrom:CruzZhao@linux.alibaba.com fp:SMTPD_---0W2-P34F_1709806800) by smtp.aliyun-inc.com; Thu, 07 Mar 2024 18:20:00 +0800 From: Cruz Zhao To: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] Documentation: add description of forceidle time statistics Date: Thu, 7 Mar 2024 18:19:43 +0800 Message-Id: <20240307101945.11280-2-CruzZhao@linux.alibaba.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240307101945.11280-1-CruzZhao@linux.alibaba.com> References: <20240307101945.11280-1-CruzZhao@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add description of forceidle time statistics, including task perspective and cgroup perspective. Signed-off-by: Cruz Zhao --- Documentation/admin-guide/cgroup-v2.rst | 3 ++- .../admin-guide/hw-vuln/core-scheduling.rst | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 17e6e9565156..b82717767c61 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1081,8 +1081,9 @@ All time durations are in microseconds. - user_usec - system_usec - and the following five when the controller is enabled: + and the following six when the controller is enabled: + - core_sched.force_idle_usec - nr_periods - nr_throttled - throttled_usec diff --git a/Documentation/admin-guide/hw-vuln/core-scheduling.rst b/Documentation/admin-guide/hw-vuln/core-scheduling.rst index cf1eeefdfc32..95a4920a2a9b 100644 --- a/Documentation/admin-guide/hw-vuln/core-scheduling.rst +++ b/Documentation/admin-guide/hw-vuln/core-scheduling.rst @@ -224,3 +224,27 @@ with SMT enabled. There are other use cases where this feature could be used: - Gang scheduling: Requirements for a group of tasks that needs to be scheduled together could also be realized using core scheduling. One example is vCPUs of a VM. + +Statictics +---------- +A task's forceidle statistics are exported via 1 field in procfs. + +/proc/$pid/sched: + + - se.statistics.core_forceidle_sum: Force idle time caused by this task, + unit: ms. It is worth noting that, if this task is running on cpux whose SMT + siblings are forced idle, the irq time of cpux during this period will be + accounted to this task's force idle time. + +This interface is read-only. + +A group's forceidle statistics are exported via 1 filed in cpu.stat. + +cpu.stat: + + - core_sched.force_idle_usec: Force idle time caused by this cgroup' tasks, + unit: us. It is worth nothing that, if this cgroup's task is running on cpux + whose SMT siblings are forced idle, the irq time of cpux during this period + will be accounted to this cgroup's force idle time. + +This interface is read-only. -- 2.39.3