From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 287B51F6675 for ; Fri, 17 Jan 2025 06:58:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737097141; cv=none; b=rvWzAKjE7a85TOlk5BnvwOu3pG8cGlCJo7NHJFWVJsKnJ/DcvIXn1DOuKl/BGeABA701NdTfjOGNOUowA83RPRiPuxyNZe53SoNFP+2MQqEcSPPYgSzIXC981YeCZrS/x75O7bjMK2ln1PM3a1h7V9/T+qIpTK5iF04n/7Kp3a8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737097141; c=relaxed/simple; bh=wN6bNfxBWhlqnDfeslB2Chw9hSSPJQJgDGaykePubxw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=TBoX7Bnk9VFy6jICw/b+xScGNf/Fvg0gWPDvOoVehdgxvajLTXzM/jJcduEIUb0/Yco310u/tbMMHN4GIXzTCEGsdn4vtNVEXinBNBkZxY3NwmEweLGQjo9BCgfdMM5LNRDxvvc3pcG+E3DXnrM1/DMH7EaEkkqclP8MIcQM3D0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=B7wRQ7pw; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="B7wRQ7pw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737097137; h=from:from: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:autocrypt:autocrypt; bh=5n/fTj3Tj01ayx0L2xKfRrCdONvQcFHXl2LZLkl0XMA=; b=B7wRQ7pwdvreDw6qUvbqUCsKfLBSpQjppqlM81A9F8UBMwtMHtHPDuLR2GLVfrnLu6jpNS e7KKYaGHr+17YvgBvJYWLd3Pxp39j2RC6To5WL/y5mzu8rJxTikqRBTRAfL5jWZvogsUwA rrpGUMEPha5eOKyJyh2//OncwjBXavA= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-64-UAqZe9RrMQuiyDX6zgPRrg-1; Fri, 17 Jan 2025 01:58:54 -0500 X-MC-Unique: UAqZe9RrMQuiyDX6zgPRrg-1 X-Mimecast-MFC-AGG-ID: UAqZe9RrMQuiyDX6zgPRrg Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3862f3ccf4fso717106f8f.0 for ; Thu, 16 Jan 2025 22:58:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737097133; x=1737701933; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5n/fTj3Tj01ayx0L2xKfRrCdONvQcFHXl2LZLkl0XMA=; b=CSYDdB8Ss0IrWlgb54wutKzEQcSVRmgVQBQTL4xKhQ/HBrf1HAn6hhcloJv8K1m0A7 yi/0ZfDxETSsPSrriD49WrkhNlfiL4cvRHz61aUfABzdxGYtReLsNaYZ9IoBcyxgcmzK goVF9/IDhfMWK6ZBmrTFoVsiJK+/AR8eCk9J4H8+MNHuUZRoMbCDbvzcl09FRlSW4Y99 QAQwUcr1Er22U8suhm90eY55lz5LBB85fkG/aXJb9weHMXNsVkJ7MJaBp7pyQ7RL4pFL gS7mVVIU2CJKOAAA0cFLSXGeCtMMHEH4p7pIANdn6Z4yjZRxB4YQc8sFa1wS5QeTl2pf n03Q== X-Forwarded-Encrypted: i=1; AJvYcCWTm70vPWDmBTTcKUkvx52Qx1FPOonbSe48+CjlPowbbJzYrdO5wApC0FVEE3q78VeF2LRqumAe1VOpBo4=@vger.kernel.org X-Gm-Message-State: AOJu0YyoSbFzEoeDidliM5O+adlP3u7gulHw1rD7ncFQtRp+6Y04hLHt J0XoNLfCysR+io8v9cf6wUZw6mnO8882QGXSeXE/nhB2NyyNkULDNJZaA1CZIn0CqUHkXy4pjeX Z/fGR88JbmdJYM1f6Ts96GYLj1QPWQEbQnC6OPbNQHs0VpnYzBaP83ju+FPzL7Q== X-Gm-Gg: ASbGncvCj9pxZQ/TeAtfGiTfDTmw6n70O1OOgiu+8psz1Eixv76eA5kYdYziPIuOYgf 72NKGNtazKx8s1ZPmiO/wsqu2EqTcBPMAcwHqmS0Fe2mqIByvK2Ld6m1odbZ0iTDXj8PbrJbOin VlLWtYrkELOoRC7yhJEzTvn+mX8U7AO0T+Jm6o6yekWAXCdMZtHpU6G02RtavyMihhhvIT2d5PD GlKU+0rwLDgAmhxm0pzajfsC8Pjg27N0AMURGXJla0CGVP4s184fiokqp0nRdaHihEolLxOehla 7oNYM4I= X-Received: by 2002:adf:e607:0:b0:38b:d765:7046 with SMTP id ffacd0b85a97d-38bf56855dbmr1001749f8f.33.1737097133580; Thu, 16 Jan 2025 22:58:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKZ8zJMii74BWgge3O0M2SkI75Dpm4IBiH6Ebs0htAVM/pajgVAzCYW6RHojYxyGYKNoKAyg== X-Received: by 2002:adf:e607:0:b0:38b:d765:7046 with SMTP id ffacd0b85a97d-38bf56855dbmr1001736f8f.33.1737097133114; Thu, 16 Jan 2025 22:58:53 -0800 (PST) Received: from gmonaco-thinkpadt14gen3.rmtit.csb ([185.107.56.40]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c7499821sm83118445e9.2.2025.01.16.22.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 22:58:52 -0800 (PST) Message-ID: Subject: Re: [PATCH 5/5] rtla/timerlat_top: Abort event processing on second signal From: Gabriele Monaco To: Tomas Glozar , Steven Rostedt Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, John Kacur , Luis Goncalves Date: Fri, 17 Jan 2025 07:58:50 +0100 In-Reply-To: <20250116144931.649593-6-tglozar@redhat.com> References: <20250116144931.649593-1-tglozar@redhat.com> <20250116144931.649593-6-tglozar@redhat.com> Autocrypt: addr=gmonaco@redhat.com; prefer-encrypt=mutual; keydata=mDMEZuK5YxYJKwYBBAHaRw8BAQdAmJ3dM9Sz6/Hodu33Qrf8QH2bNeNbOikqYtxWFLVm0 1a0JEdhYnJpZWxlIE1vbmFjbyA8Z21vbmFjb0ByZWRoYXQuY29tPoiZBBMWCgBBFiEEysoR+AuB3R Zwp6j270psSVh4TfIFAmbiuWMCGwMFCQWjmoAFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgk Q70psSVh4TfJzZgD/TXjnqCyqaZH/Y2w+YVbvm93WX2eqBqiVZ6VEjTuGNs8A/iPrKbzdWC7AicnK xyhmqeUWOzFx5P43S1E1dhsrLWgP Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 (3.54.2-1.fc41) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2025-01-16 at 15:49 +0100, Tomas Glozar wrote: > Apply the changes from the previous patch also to timerlat-top. >=20 > Signed-off-by: Tomas Glozar > --- > =C2=A0tools/tracing/rtla/src/timerlat_top.c | 8 ++++++++ > =C2=A01 file changed, 8 insertions(+) >=20 > diff --git a/tools/tracing/rtla/src/timerlat_top.c > b/tools/tracing/rtla/src/timerlat_top.c > index d21a21053917..d358cd39f360 100644 > --- a/tools/tracing/rtla/src/timerlat_top.c > +++ b/tools/tracing/rtla/src/timerlat_top.c > @@ -903,6 +903,14 @@ static int stop_tracing; > =C2=A0static struct trace_instance *top_inst =3D NULL; > =C2=A0static void stop_top(int sig) > =C2=A0{ > + if (stop_tracing) { > + /* > + * Stop requested twice in a row; abort event > processing and > + * exit immediately > + */ > + tracefs_iterate_stop(top_inst->inst); > + return; > + } > =C2=A0 stop_tracing =3D 1; > =C2=A0 if (top_inst) > =C2=A0 trace_instance_stop(top_inst); I confirm the patchset works as expected on a 128 cores machine. That is like the machine where the problem was first observed: run timerlat with -p 100 and it would hang. Now running it with -d terminates (a bit) after the expiration of the timer with a sane report, sending a SIGINT terminates it too and sending 2 SIGINT terminates it almost instantaneously.=09 This works on both timerlat top and hist, with both -u and -k . The report only gets printed in the end (as if -q was passed), but these patches are not meant to fix that. Tested-by: Gabriele Monaco