From nobody Tue Dec 2 02:05:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46D7A30146D; Thu, 20 Nov 2025 23:26:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763681195; cv=none; b=EvEoXcXd1/0Bp7mlX/JWWaPrOJF+RjYOv35GwAJXCEaTwswA/kOau8Iid8Twi+XtcTcYZEcbscWbgVqKwFmJh9ebiP/VBvRRTBbVSxbuHHKkfNmNyAcxl5NiYDEDTIonxc9iWWLHkkij60faFZsqOcydoo7lug1JF2IdYy7Vhh0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763681195; c=relaxed/simple; bh=IzzXrKpnxD77S92ynC5y2Koa1yDERlcqMfRIHt5aWrc=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=hHuC+x5fNUD4ujWpoovLVICiHieL55Z8y0MLLsUgWpDK5kipP2IkmZ3aEppHDzzX8dINzaAZu8gBHtuKyNwpi/0iTzS5Dn33U5oEVO1iv3WGOtLL31E48xkjH2Fmzsl/SJ+dyNuDkau5bFrUO8NCW0562RApAg6NTVgP0JslzqM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JOz75Qbf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JOz75Qbf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05D30C19421; Thu, 20 Nov 2025 23:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763681195; bh=IzzXrKpnxD77S92ynC5y2Koa1yDERlcqMfRIHt5aWrc=; h=Date:From:To:Cc:Subject:References:From; b=JOz75QbfYPf1lLjECkzgIr3HvHniReLyUTIUP5He64TV2YGPX9xIRFTHZBzxGLY0p CcIdrx2aYZXNwyH/qYTBBSkIUYrG1yEa47m4nP7Hohgz5jWIrQi1glDbicRL6bFaYo 3Nr2fpyc54YfZcECsJwBteFbbupy5Lhg2MqGSd+4nBL+Qm3F0eJkAebG1XB482dVNu uUl3Kj6lUw0DyeRpkqJYs1yjXO2CiDmBf90bPhivcEClB4yIU6mIABXBq88DJZuM2E LUO8zc8QC63730pkf30oSUE78gJe7NhYCPgHRvQKExXvav7ysn+zDqpWqIqJmQIuVt bQEgQsCnwFOqA== Received: from rostedt by gandalf with local (Exim 4.98.2) (envelope-from ) id 1vME3Q-000000041sC-0NxX; Thu, 20 Nov 2025 18:27:08 -0500 Message-ID: <20251120232707.946976394@kernel.org> User-Agent: quilt/0.68 Date: Thu, 20 Nov 2025 18:23:27 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Tomas Glozar , John Kacur , stable@vger.kernel.org, Wander Lairson Costa Subject: [for-next][PATCH 04/16] rtla/timerlat_bpf: Stop tracing on user latency References: <20251120232323.271532418@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Tomas Glozar rtla-timerlat allows a *thread* latency threshold to be set via the -T/--thread option. However, the timerlat tracer calls this *total* latency (stop_tracing_total_us), and stops tracing also when the return-to-user latency is over the threshold. Change the behavior of the timerlat BPF program to reflect what the timerlat tracer is doing, to avoid discrepancy between stopping collecting data in the BPF program and stopping tracing in the timerlat tracer. Cc: stable@vger.kernel.org Fixes: e34293ddcebd ("rtla/timerlat: Add BPF skeleton to collect samples") Reviewed-by: Wander Lairson Costa Link: https://lore.kernel.org/r/20251006143100.137255-1-tglozar@redhat.com Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/timerlat.bpf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/tracing/rtla/src/timerlat.bpf.c b/tools/tracing/rtla/src= /timerlat.bpf.c index 084cd10c21fc..e2265b5d6491 100644 --- a/tools/tracing/rtla/src/timerlat.bpf.c +++ b/tools/tracing/rtla/src/timerlat.bpf.c @@ -148,6 +148,9 @@ int handle_timerlat_sample(struct trace_event_raw_timer= lat_sample *tp_args) } else { update_main_hist(&hist_user, bucket); update_summary(&summary_user, latency, bucket); + + if (thread_threshold !=3D 0 && latency_us >=3D thread_threshold) + set_stop_tracing(); } =20 return 0; --=20 2.51.0