Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4635464pxb; Tue, 5 Oct 2021 07:16:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/J8wIc0kg7utOG72mX4xoPtYGG2bP9Fp0uRv82AP1bJ7BXfFE7azcT7REFXr/7bjPd9O+ X-Received: by 2002:a05:6402:143b:: with SMTP id c27mr27256140edx.224.1633443411926; Tue, 05 Oct 2021 07:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633443411; cv=none; d=google.com; s=arc-20160816; b=BolNKFyHloT2AhHt1t9Bbn9yIdK4xXKLG9cg8NeqRy0RQ1D8rYK9R7Hms1LqNodx86 d2PJiVy2B6RtjePwjPex3l8pL53fPt4qlkF2WkLJ7AG16mBuWAkFuOIDKXhKK+RrOWMd YT2sl5k2DsHYXdT7eZ9baan1GlIR3HTsT44BkaTRm5dVp0o0yRt1OAsxw8i3PohBvtOA O0Qyw6HCwsd2T7soBVjUCwGnb4mYtOmYk3mJ5+dCe6kWfm98za3paygPZ3EMZto/ieTU bOFOC9wela9rRcJx59faiuERedO/SLBNwRj7F7MsZ7IKoJ//LsCGZdEwBOtQZvDClxP0 x7Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=5LbmlTMyhAyy+4IodFqJpZp/kv+c0QJufYRXZCIU4Nc=; b=qn8SzGwVi3u8/KWfx/3AQGQP5UU9Kfg0XmzHB7RCvvr/krxZU0dLIyuoZPcjPwI4qV Q4qmJcavBPKTtR0CGXU6WrVsFTxKoV/dmZ8Gkfxm670zlPy7VtyV+4UPg80h9wDRx3C1 PedhBy86T+xlln3D0nfDNayBPOWhXKhn6hEVIekyPDz1PEtC/ZbZeWAle8IMbMlUgYcf S4ofZMWY5ULdCrTuTKEB30HyTKGNQvSkCiQ/lrsUiKHnVOCMA1rsMdZpMs0MNWX7NzpV i/JO3Bmf+CcRu+CwQGheHU8eO6PsI0hjY69fXm6I77/LnTZUkejWzIQT8DkqY0z23muM HyVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=VseMxB5L; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="rDRrB00/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si14445136ejv.754.2021.10.05.07.16.22; Tue, 05 Oct 2021 07:16:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=VseMxB5L; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="rDRrB00/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236136AbhJEOO5 (ORCPT + 99 others); Tue, 5 Oct 2021 10:14:57 -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);