Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2405272ybt; Tue, 16 Jun 2020 05:25:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/M8KoCDuolG2vPDmrfgkiIfMNjfnruCLNmXCVWAycGE7L3pmvf6CoxBPYBH2SYVK904/E X-Received: by 2002:a17:906:1e92:: with SMTP id e18mr2630479ejj.254.1592310304675; Tue, 16 Jun 2020 05:25:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592310304; cv=none; d=google.com; s=arc-20160816; b=r8mAgLdwW9dANSMUaX9pSCU53rdjwiZp+EaY/hPbCtcy6H4ArP9igWRrUFookAwoVK f6LWhwJoN5QiSY2eFGH+/AtRIIuKbXqikHhtelv8e7NOOHrU+bXc8lNivURCjcjWy6jn beQy4ACKV5+G8GKydM0X4eyywrWURfQ3RoU+s+I1155SuA6GD5KAYViQybFfkrAdwFPf Z9TampZYEZpBtylRhpkmMy0fstTbhu8LAT/q3WzsDCjecL57f4sKT8cUHXIJ8k14HiZA ULVOWMNrsEaRmGt1+I93HTofQ94qtFhxb6rApdMZ74tB3hbShftMNYjxc9oWti+IrGuj inKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=xoQfDCGZJI7z8Ah+PudNMQ0pB8Ijyz/tfT8oOMe1FUY=; b=zvo3SWgY8JR8uKqkWoT++pJFqDbNqn1Q7IjJWBAbmm7+je2BqumXsAvHlAow/WwDTg e+EqqWoqccrKxaRv/gk2MGw3BWvGk/MbkAXADz1SX9ojG3mLgmIHoJsIoyoufIXfuRO3 OMhl2qQgcMA0Vp6lsmmC4CY7mgSYLe+OfUiuZhH2kCmHE0LCWbkV9RFJSAHYNhq/hDC1 VSc0l1WdUvSpmuREUg/Fnjw7zbPRP3Gvt8eKFfvfcauoQ786bq9wg2191awXQ/20SL3a VcLDNlxUSnoTNUsmRoME0mAnpaALmtztGrSQuzp/GAIi9dUMagwUJsI3aTsTXtxEGNAY vcbg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd24si10024576edb.336.2020.06.16.05.24.42; Tue, 16 Jun 2020 05:25:04 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726306AbgFPMWe (ORCPT + 99 others); Tue, 16 Jun 2020 08:22:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728960AbgFPMWI (ORCPT ); Tue, 16 Jun 2020 08:22:08 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D07CC08C5C2; Tue, 16 Jun 2020 05:22:08 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jlAbM-0004ko-SP; Tue, 16 Jun 2020 14:22:05 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 9B8C41C0852; Tue, 16 Jun 2020 14:21:55 +0200 (CEST) Date: Tue, 16 Jun 2020 12:21:55 -0000 From: "tip-bot2 for Vincent Donnefort" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/debug: Add new tracepoints to track util_est Cc: Vincent Donnefort , "Peter Zijlstra (Intel)" , Valentin Schneider , x86 , LKML In-Reply-To: <1590597554-370150-1-git-send-email-vincent.donnefort@arm.com> References: <1590597554-370150-1-git-send-email-vincent.donnefort@arm.com> MIME-Version: 1.0 Message-ID: <159231011535.16989.4063331664061599328.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org 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: 4581bea8b4ec4de353369775dfef921191e393b3 Gitweb: https://git.kernel.org/tip/4581bea8b4ec4de353369775dfef921191e393b3 Author: Vincent Donnefort AuthorDate: Wed, 27 May 2020 17:39:14 +01:00 Committer: Peter Zijlstra CommitterDate: Mon, 15 Jun 2020 14:10:02 +02:00 sched/debug: Add new tracepoints to track util_est The util_est signals are key elements for EAS task placement and frequency selection. Having tracepoints to track these signals enables load-tracking and schedutil testing and/or debugging by a toolkit. Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/1590597554-370150-1-git-send-email-vincent.donnefort@arm.com --- include/trace/events/sched.h | 8 ++++++++ kernel/sched/core.c | 2 ++ kernel/sched/fair.c | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index ed168b0..04f9a4c 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -634,6 +634,14 @@ DECLARE_TRACE(sched_overutilized_tp, TP_PROTO(struct root_domain *rd, bool overutilized), TP_ARGS(rd, overutilized)); +DECLARE_TRACE(sched_util_est_cfs_tp, + TP_PROTO(struct cfs_rq *cfs_rq), + TP_ARGS(cfs_rq)); + +DECLARE_TRACE(sched_util_est_se_tp, + TP_PROTO(struct sched_entity *se), + TP_ARGS(se)); + #endif /* _TRACE_SCHED_H */ /* This part must be outside protection */ diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 9c89b0e..0208b71 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -36,6 +36,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(pelt_dl_tp); EXPORT_TRACEPOINT_SYMBOL_GPL(pelt_irq_tp); EXPORT_TRACEPOINT_SYMBOL_GPL(pelt_se_tp); EXPORT_TRACEPOINT_SYMBOL_GPL(sched_overutilized_tp); +EXPORT_TRACEPOINT_SYMBOL_GPL(sched_util_est_cfs_tp); +EXPORT_TRACEPOINT_SYMBOL_GPL(sched_util_est_se_tp); DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 69da576..a785a9b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3922,6 +3922,8 @@ static inline void util_est_enqueue(struct cfs_rq *cfs_rq, enqueued = cfs_rq->avg.util_est.enqueued; enqueued += _task_util_est(p); WRITE_ONCE(cfs_rq->avg.util_est.enqueued, enqueued); + + trace_sched_util_est_cfs_tp(cfs_rq); } /* @@ -3952,6 +3954,8 @@ util_est_dequeue(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep) ue.enqueued -= min_t(unsigned int, ue.enqueued, _task_util_est(p)); WRITE_ONCE(cfs_rq->avg.util_est.enqueued, ue.enqueued); + trace_sched_util_est_cfs_tp(cfs_rq); + /* * Skip update of task's estimated utilization when the task has not * yet completed an activation, e.g. being migrated. @@ -4017,6 +4021,8 @@ util_est_dequeue(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep) ue.ewma >>= UTIL_EST_WEIGHT_SHIFT; done: WRITE_ONCE(p->se.avg.util_est, ue); + + trace_sched_util_est_se_tp(&p->se); } static inline int task_fits_capacity(struct task_struct *p, long capacity)