From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48405C433F5 for ; Tue, 5 Oct 2021 14:13:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3652B6113A for ; Tue, 5 Oct 2021 14:13:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236425AbhJEOO6 (ORCPT ); Tue, 5 Oct 2021 10:14:58 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:51328 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235302AbhJEOOA (ORCPT ); Tue, 5 Oct 2021 10:14:00 -0400 Date: Tue, 05 Oct 2021 14:12:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1633443128; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5LbmlTMyhAyy+4IodFqJpZp/kv+c0QJufYRXZCIU4Nc=; b=VseMxB5LF4h+p9cN2EspA2ZlSpZXd/7ihQH2hLSXVFDSL+Xx2cGaWgNnLXM4K7JN2EtFXD qR4xQjOiB0QfqRbCweJu20c4Fb6FKwtPGkZvL8QNiCnwBHf3PwTeeGJ8XlsyFIUkCz0ITo +EBoAl/lc1htNTmiWo6uSO/NLFKkUheFtgmyqFsouNITMJfnH4bJNp8XCpNiAS7WoNpY12 5lna3v410lazwtU58IhfF+gPrvcs4Cv7XzefWsgsfm5IGsUsIH6naa+V9L1o0cMhmihEr4 bZVNCQDmCcyiD4A3uvEURhvv37WtZLbVJPvQQa/h9jefK6uYWxgNLhvXeFFqJQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1633443128; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5LbmlTMyhAyy+4IodFqJpZp/kv+c0QJufYRXZCIU4Nc=; b=rDRrB00/n/wwL+eaklc6M/QjOJSjllf4lIilVWFjCCsGxx0xqzcsnJvVcAm04/B7lEZfxm w1W+QiFsQExK6pBw== From: "tip-bot2 for Yafang Shao" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/rt: Support sched_stat_runtime tracepoint for RT sched class Cc: Yafang Shao , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210905143547.4668-6-laoar.shao@gmail.com> References: <20210905143547.4668-6-laoar.shao@gmail.com> MIME-Version: 1.0 Message-ID: <163344312778.25758.1766433794457376552.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: ed7b564cfdd0668efbd739d0b4e2d67797293f32 Gitweb: https://git.kernel.org/tip/ed7b564cfdd0668efbd739d0b4e2d67797293f32 Author: Yafang Shao AuthorDate: Sun, 05 Sep 2021 14:35:44 Committer: Peter Zijlstra CommitterDate: Tue, 05 Oct 2021 15:51:49 +02:00 sched/rt: Support sched_stat_runtime tracepoint for RT sched class The runtime of a RT task has already been there, so we only need to add a tracepoint. One difference between fair task and RT task is that there is no vruntime in RT task. To reuse the sched_stat_runtime tracepoint, '0' is passed as vruntime for RT task. The output of this tracepoint for RT task as follows, stress-9748 [039] d.h. 113.519352: sched_stat_runtime: comm=stress pid=9748 runtime=997573 [ns] vruntime=0 [ns] stress-9748 [039] d.h. 113.520352: sched_stat_runtime: comm=stress pid=9748 runtime=997627 [ns] vruntime=0 [ns] stress-9748 [039] d.h. 113.521352: sched_stat_runtime: comm=stress pid=9748 runtime=998203 [ns] vruntime=0 [ns] Signed-off-by: Yafang Shao Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210905143547.4668-6-laoar.shao@gmail.com --- kernel/sched/rt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 95a7c3a..5d25111 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1012,6 +1012,8 @@ static void update_curr_rt(struct rq *rq) schedstat_set(curr->stats.exec_max, max(curr->stats.exec_max, delta_exec)); + trace_sched_stat_runtime(curr, delta_exec, 0); + curr->se.sum_exec_runtime += delta_exec; account_group_exec_runtime(curr, delta_exec);