From patchwork Mon May 22 14:56:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 685270 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76EDFC77B73 for ; Mon, 22 May 2023 14:57:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233638AbjEVO5M (ORCPT ); Mon, 22 May 2023 10:57:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230015AbjEVO5L (ORCPT ); Mon, 22 May 2023 10:57:11 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 86C69BB; Mon, 22 May 2023 07:57:10 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 446CC11FB; Mon, 22 May 2023 07:57:55 -0700 (PDT) Received: from e123648.arm.com (unknown [10.57.22.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1262E3F6C4; Mon, 22 May 2023 07:57:06 -0700 (PDT) From: Lukasz Luba To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, rafael@kernel.org, linux-pm@vger.kernel.org Cc: rostedt@goodmis.org, mhiramat@kernel.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, delyank@fb.com, lukasz.luba@arm.com, qyousef@google.com, qyousef@layalina.io Subject: [RESEND][PATCH v2 0/3] Add basic tracing for uclamp and schedutil Date: Mon, 22 May 2023 15:56:59 +0100 Message-Id: <20230522145702.2419654-1-lukasz.luba@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi all, The task scheduler feature: Uclamp, begins to take off. To better understand the dynamics in the task scheduler and CPU frequency requests we need some better tracing. In schedutil (cpufreq governor) we allow to enter the scheduler and make the frequency change. Although, there is some limit in regards to how often this can happen. That min period is provided by the cpufreq driver. Thus, some of the cpufreq requests might be filter out and the frequency won't be changed (hopefuly will be set a bit later). We would like to know about those situations, especially in context of the user-space hints made via Uclamp for particular tasks. This patch set aims to add base for our toolkits and post-processing trace analyzes. Changelog: v2: - solved the issue from CI build warning, dropped schedutil.h and re-used the sched.h which is available in build_utility.c where cpufreq_schedutil.c is included - added tag for the last patch 3/3 for the CI robot helping hend - re-based on top of v6.4-rc1 v1: - implementation can be found here [1] Regards, Lukasz Luba [1] https://lore.kernel.org/lkml/20230322151843.14390-1-lukasz.luba@arm.com/ Lukasz Luba (3): sched/tp: Add new tracepoint to track uclamp set from user-space cpufreq: schedutil: Refactor sugov_update_shared() internals schedutil: trace: Add tracing to capture filter out requests include/trace/events/sched.h | 8 ++++++++ kernel/sched/core.c | 5 +++++ kernel/sched/cpufreq_schedutil.c | 28 ++++++++++++++++++---------- 3 files changed, 31 insertions(+), 10 deletions(-)