Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1313365pxb; Thu, 16 Sep 2021 05:01:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0upytPhNPS3ZHGHSH4xX6uxlNhBo1f8PpXIEhnQLfuwAYaCmwQDXWZVQF3SmbpaOup5Gk X-Received: by 2002:a5e:da44:: with SMTP id o4mr3907587iop.147.1631793668785; Thu, 16 Sep 2021 05:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631793668; cv=none; d=google.com; s=arc-20160816; b=xJMvtu8yRzbAVUVpR2Yt1QFKMxJBSIH2d12WkVT1FmtrG8CikYB7gZ40H87lb+rhuj G9snnQtYCGLE9ccpW3o6UjpEtqbRM5boawdxmytfFHLFzrwDT5cD8k+hTofVdhBP9cG4 BMkTtevvoZB0ZXzuUwxe7cRd1gX1Jz2QOPFplFRXgLjQ2ksz7Jh6o98ozlQpkGLjpc80 +DoIz7GxlBK5aUppbunKJfhvSu+Jb2R2gBSfOfnTCmIDqfWy7UV+gI2BtWOKmt4IupTt ZEWfB3S5qAR+L/iqpD53zWNJJkaYyhKLqQQQHGpJJl5s1amW1rtmb/0xNego38fgGA+o 5QnA== 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=Ju5wpRy5VCaPdOH7TPFt5oHq8rBah+cvHqE9dNm/Q+A=; b=v+0MhBlg6oyL6p1JlxEYG5wDgqeGlvg8jJ917T39Tr/PP6JWNYT/hlOO2OCrTs2YjY tZnXV97t95WRn/cIX/vBX2wQ6eoR6+WQdeJ4RsYm4mNUljCa9tY3pPdHotQquj1jk1jN 7tuRPiM8drmijJUefO/GIb+Oo+IH4YTd497Qaba0rufcYYs98sS8CueZzpKNDq/goTmL K1bK9ydXibPtzxOExZbgeEWOHcn5bcHhzAh1RHSWC2wcIFJrG2LySVqlwTS/CiimXAIZ SQiVuCDRg4cSCTbuIRbyNpStANNnQdrO+gY8DGo5ynPGDP/ne0WkA8wB+K0w6o7CtBDJ 4tEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=c9CEY2RJ; dkim=neutral (no key) header.i=@linutronix.de; 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 g23si2302428jad.40.2021.09.16.05.00.56; Thu, 16 Sep 2021 05:01:08 -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=c9CEY2RJ; dkim=neutral (no key) header.i=@linutronix.de; 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 S238812AbhIPMBE (ORCPT + 99 others); Thu, 16 Sep 2021 08:01:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238763AbhIPMAv (ORCPT ); Thu, 16 Sep 2021 08:00:51 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02FAAC061768; Thu, 16 Sep 2021 04:59:31 -0700 (PDT) Date: Thu, 16 Sep 2021 11:59:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1631793569; 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=Ju5wpRy5VCaPdOH7TPFt5oHq8rBah+cvHqE9dNm/Q+A=; b=c9CEY2RJ8v9V3oi9eNQnh6XIhdpWY9wdojObRzoIBLmYFnx12YuZ4I+/K6azSTKRN6Ul7C c7b95/qv3l/rsKnODBOvY3Y4iB2LZBv4nKvYx/WFqIrWUhY5YQArvII18f/rrj/lp5XKv3 8h3aSS5XJoM0f8VvV+ODPFI8e2+3NemSEZEKyKBDKTORPgnvBSO2I5NT8kzS5ijSXa0R6e W0V8j/w5GjXsFcDWD/6it8CThULAA8hzPrvk6Zp9113f3AZI9TW6bbok5jBuY8UOdHlZVT /Xstv86GsJ76rK319G8DcfFGWdGCRAj+pFhN3+3GYbZa0giTtDvfQhF/czZHJg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1631793569; 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=Ju5wpRy5VCaPdOH7TPFt5oHq8rBah+cvHqE9dNm/Q+A=; b=xowXicWbhPDcg0JLJO1w45+8OF7nowDpQk6Oo+x7AfdYUubIkhD4E1Y3DUJk6idXl3tuCY awJ/0RjO0hPHlLAA== 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: <163179356891.25758.1697118289025220625.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: 75ded49a19c6b655bba7ff9e5541daef4f882d78 Gitweb: https://git.kernel.org/tip/75ded49a19c6b655bba7ff9e5541daef4f882d78 Author: Yafang Shao AuthorDate: Sun, 05 Sep 2021 14:35:44 Committer: Peter Zijlstra CommitterDate: Wed, 15 Sep 2021 17:48:59 +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);