From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f202.google.com (mail-pg1-f202.google.com [209.85.215.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 926D5248F57 for ; Mon, 1 Dec 2025 20:13:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764620032; cv=none; b=aIud4W6Bsaq9fhdrsb46wB+jTHkeHhm34JrI+LvV4aIvzF1zVHCDvt5Yd+85aPIxG5F3x02xICluxq3JU2s7CseqV6Nki47LhKhknss+cMpDmhvJR7h19qTSxWm+Mv7VJgMxLTc2O/N5+Mu2AJaIb+k89H03uCE7IQaKMIg4ZZw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764620032; c=relaxed/simple; bh=9VtX2NvFz0RoQVJ8SSqGMuTYPnLO3r9LWpqks/kmpMQ=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=SDruSAE3yLb5I9G7FCZ3uDm3V3hUSYv6shDcfJZOgzosb/6P0j86IBvSu+ViDY2lCQPmUnpRP/o0JAdNZkHq+hfMPzGqSOySI7I0CyGUdXJ6PBbebr2yLxtw+I0RsXzjUyvUBbokMP1QrR1l2nbLSi2/mgCaEKvuFuJ1f5/GOJY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--wusamuel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=jRKqUwwn; arc=none smtp.client-ip=209.85.215.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--wusamuel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="jRKqUwwn" Received: by mail-pg1-f202.google.com with SMTP id 41be03b00d2f7-b6ce1b57b9cso4730356a12.1 for ; Mon, 01 Dec 2025 12:13:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764620030; x=1765224830; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=iuYJ8a9yf5YfCIOX0vDCxkx5Zc9d0WA0EbWHTfFbCpI=; b=jRKqUwwnTlwu/0AAj6G3qBK23FoKtQsPzDsVvDs0GLjsiq1FTfKxBbHxtiwYvHCE/w knsvULBpDhQ9LZ82t7bL31ux7zFXlvIC1jPOEGmz0xv4X4McZmO2E8ahxsB3/UmNQpUw 08SFa1z6rBVHavxdnLSHUOsYNkZysPkQaLzxcIFwXDRVSptb2WLBfO17ZQIX589qzuQl HohpsBnncmXNUAtMX+eLzz/Zbf9LQtj8+dBp97a867Wq2jeo1Tq2iP4IZ8VlQfew7Pi9 /F9Cpff68IuMy32/grsrrvofkKnCjc2rinMo0Dwm5Dy/ZTKVlFiJpCG5ZW7dHxF45Im/ eihg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764620030; x=1765224830; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iuYJ8a9yf5YfCIOX0vDCxkx5Zc9d0WA0EbWHTfFbCpI=; b=GMRpgOnoTHLW4C2M9yoAGMy5AACcuCU63hF9X1m5IyiUkTeEY3s7FB8AV9apaz1P20 MPPVjLwTPW5w/0PF+PFlUitTArwaqaRqzsyE12iyFZe41FXgw2ANq1yAonVkCVHMygnZ wJYLGcESsftDVlgBsZclaHarpEVjMb036wZ6Lvsko8Pp8G5E945U/U+o0QstI5Bkm31N fPwObDA/FELVIHQ79GmxLMr0zz/vTsdYPUXEM7w1xrIbVxQ46yT7tV9NX6ZgI4eEJ8kP D02BfVhOmeI0PFg37wUOL2LAf2bo7JKXuPDVy310W6m2Ne2ReoQ0x51fMy01eHGw7bsC hdfQ== X-Forwarded-Encrypted: i=1; AJvYcCW+VwSJcRNhNwQgFBYNajr4jYIwlsCIK0c1fq1UtqXVLXx/5Ify19cRJbMtFO8GEFafstzLqjUSoo8=@vger.kernel.org X-Gm-Message-State: AOJu0YxrXOvAI4OEHoxmH7O3iupXR6Tbu6efS/zZXF7K6XPe2nBFwUrc YFJ+ZG2OkaopBFVkP/hMUCiOBBjOq+VUGf0EUoaeM20v/eRYffd142JlBrLm8JUl/72FLUm9Hdl s48MRCgvw1yss4A== X-Google-Smtp-Source: AGHT+IHwEd6CC+Ib7OeMos3b1t3bc4lXCHaFp0yIxO9IsHk9Gm1v7kabVCFDtPGco41OaIdly9vw6Aa5LtX7ZA== X-Received: from dybmh37.prod.google.com ([2002:a05:7301:f25:b0:2a4:612e:b41f]) (user=wusamuel job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7301:21a1:b0:2a4:3593:ddd6 with SMTP id 5a478bee46e88-2a71953ce11mr18461346eec.3.1764620029774; Mon, 01 Dec 2025 12:13:49 -0800 (PST) Date: Mon, 1 Dec 2025 12:13:38 -0800 Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.52.0.107.ga0afd4fd5b-goog Message-ID: <20251201201340.3746701-1-wusamuel@google.com> Subject: [PATCH v2 2/2] cpufreq: Documentation update for trace_policy_frequency From: Samuel Wu To: Huang Rui , "Gautham R. Shenoy" , Mario Limonciello , Perry Yuan , Jonathan Corbet , "Rafael J. Wysocki" , Viresh Kumar , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Srinivas Pandruvada , Len Brown , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Ian Rogers , Adrian Hunter , James Clark Cc: christian.loehle@arm.com, Samuel Wu , kernel-team@android.com, linux-pm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Documentation update corresponding to replace the cpu_frequency trace event with the policy_frequency trace event. Signed-off-by: Samuel Wu --- Documentation/admin-guide/pm/amd-pstate.rst | 10 +++++----- Documentation/admin-guide/pm/intel_pstate.rst | 14 +++++++------- Documentation/trace/events-power.rst | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst index e1771f2225d5..e110854ece88 100644 --- a/Documentation/admin-guide/pm/amd-pstate.rst +++ b/Documentation/admin-guide/pm/amd-pstate.rst @@ -503,8 +503,8 @@ Trace Events -------------- There are two static trace events that can be used for ``amd-pstate`` -diagnostics. One of them is the ``cpu_frequency`` trace event generally used -by ``CPUFreq``, and the other one is the ``amd_pstate_perf`` trace event +diagnostics. One of them is the ``policy_frequency`` trace event generally +used by ``CPUFreq``, and the other one is the ``amd_pstate_perf`` trace event specific to ``amd-pstate``. The following sequence of shell commands can be used to enable them and see their output (if the kernel is configured to support event tracing). :: @@ -531,9 +531,9 @@ configured to support event tracing). :: -0 [003] d.s.. 4995.980971: amd_pstate_perf: amd_min_perf=85 amd_des_perf=85 amd_max_perf=166 cpu_id=3 changed=false fast_switch=true -0 [011] d.s.. 4995.980996: amd_pstate_perf: amd_min_perf=85 amd_des_perf=85 amd_max_perf=166 cpu_id=11 changed=false fast_switch=true -The ``cpu_frequency`` trace event will be triggered either by the ``schedutil`` scaling -governor (for the policies it is attached to), or by the ``CPUFreq`` core (for the -policies with other scaling governors). +The ``policy_frequency`` trace event will be triggered either by the +``schedutil`` scaling governor (for the policies it is attached to), or by the +``CPUFreq`` core (for the policies with other scaling governors). Tracer Tool diff --git a/Documentation/admin-guide/pm/intel_pstate.rst b/Documentation/admin-guide/pm/intel_pstate.rst index fde967b0c2e0..274c9208f342 100644 --- a/Documentation/admin-guide/pm/intel_pstate.rst +++ b/Documentation/admin-guide/pm/intel_pstate.rst @@ -822,23 +822,23 @@ Trace Events ------------ There are two static trace events that can be used for ``intel_pstate`` -diagnostics. One of them is the ``cpu_frequency`` trace event generally used -by ``CPUFreq``, and the other one is the ``pstate_sample`` trace event specific -to ``intel_pstate``. Both of them are triggered by ``intel_pstate`` only if -it works in the :ref:`active mode `. +diagnostics. One of them is the ``policy_frequency`` trace event generally +used by ``CPUFreq``, and the other one is the ``pstate_sample`` trace event +specific to ``intel_pstate``. Both of them are triggered by ``intel_pstate`` +only if it works in the :ref:`active mode `. The following sequence of shell commands can be used to enable them and see their output (if the kernel is generally configured to support event tracing):: # cd /sys/kernel/tracing/ # echo 1 > events/power/pstate_sample/enable - # echo 1 > events/power/cpu_frequency/enable + # echo 1 > events/power/policy_frequency/enable # cat trace gnome-terminal--4510 [001] ..s. 1177.680733: pstate_sample: core_busy=107 scaled=94 from=26 to=26 mperf=1143818 aperf=1230607 tsc=29838618 freq=2474476 - cat-5235 [002] ..s. 1177.681723: cpu_frequency: state=2900000 cpu_id=2 + cat-5235 [002] ..s. 1177.681723: policy_frequency: state=2900000 cpu_id=2 policy_cpus=04 If ``intel_pstate`` works in the :ref:`passive mode `, the -``cpu_frequency`` trace event will be triggered either by the ``schedutil`` +``policy_frequency`` trace event will be triggered either by the ``schedutil`` scaling governor (for the policies it is attached to), or by the ``CPUFreq`` core (for the policies with other scaling governors). diff --git a/Documentation/trace/events-power.rst b/Documentation/trace/events-power.rst index f45bf11fa88d..f013c74b932f 100644 --- a/Documentation/trace/events-power.rst +++ b/Documentation/trace/events-power.rst @@ -26,8 +26,8 @@ cpufreq. :: cpu_idle "state=%lu cpu_id=%lu" - cpu_frequency "state=%lu cpu_id=%lu" cpu_frequency_limits "min=%lu max=%lu cpu_id=%lu" + policy_frequency "state=%lu cpu_id=%lu policy_cpus=%*pb" A suspend event is used to indicate the system going in and out of the suspend mode: -- 2.52.0.107.ga0afd4fd5b-goog