Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2313250rdb; Mon, 5 Feb 2024 02:38:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTfDE44uYvZf32jmfDLjKmSlaFzPDIzd4TfKWy6k6QDaYHLmm/Fa96P0aNOIwM8lVxlOS1 X-Received: by 2002:a05:6214:b61:b0:685:8ac0:c027 with SMTP id ey1-20020a0562140b6100b006858ac0c027mr7890566qvb.23.1707129511080; Mon, 05 Feb 2024 02:38:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707129511; cv=pass; d=google.com; s=arc-20160816; b=eRjW0XS34fuuKvr4KA6pR7HMpR2norjWf9l2yDHUUuKm117jMUl/ig6r5FKAoViVpk B4WqbuWijxSuPyw1QfpQWgePM81C0dBLNl+02Rj1YvlSv4HzaIb0IIimCuVMfzZhawd+ vHG8dsK9faOXJucikWajd49/zNu5uL5rv64cuy3b5ZQPjLZdZMowMkCy0fsI1n9Sl+kg gIYStHAFyxovdDHU+8rDdR+BUfA8Nu2oNy7gdXz3vXO205yQHaPkdfO8Z9wacf/0WVXy 7TvHVB6TSCTGJN+kOWsGI8n6ABjqpxclkQl+xUb5gqUtYq58O58dL5dBzeN4bVhxZ71c q6mA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=Cb5vO6/Cxd3mC2d47aDQ2dc9kqvLNvUMmRuT6zUjDaQ=; fh=RRmjhNsgu1aJTP2jM9Ji0mwdn2T7maoTvhOxzd/evJI=; b=uyw/8UKlYi0l4U8VH6u+z9/ZeXAoF8upsivtNLfeEEgcSgkPPK8G32YSpd+qrK2Wcs wocWxaWvUuz6bTwXCpInp4qvFlcRYQU0pRL3BbjNVaXiCPgpo9LQyyiqqXUg5loTP552 +sns9b5DuFaM6SVm9NPzXJBPfIUC0b/nkoPNeUPafiLHtfwFbQ4WMJOq+7m2qWetEwA9 NOOpDG92gIc8Gsr3Yzotvw5sfCLLo/91V5olJvyrTtILN8Ik233BsVBbuCU43/a9mukn dI15d/c/9HHKQvsSc5acCjwsX5OtWgk+DKv0oNuP35YAYYB0TnzOTBXdDK2jFE9VU5r2 D7/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-52419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52419-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWi4t+9rUJYMWLWkuaoG9ZPlJKqr9QZhyIup4vLShWrGN+NAu8cn+CBHrOfuIAPbfODDGQdn+hLN9oOF2gQdTdUaS/PRxshUberC9CNFg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id mz9-20020a0562142d0900b0068c53be2facsi8006451qvb.259.2024.02.05.02.38.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 02:38:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-52419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52419-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 886F81C220C0 for ; Mon, 5 Feb 2024 10:38:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 150B617582; Mon, 5 Feb 2024 10:38:25 +0000 (UTC) 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 9267517575; Mon, 5 Feb 2024 10:38:24 +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=1707129504; cv=none; b=HczjSbV0gM0kqwGczz/c3vakOVE/8Kfj/un6xmQJOpunwdVsxLSXHBu1aZc1x5NO0nYXQf9D6t8+kj2Hiu5wcP/pd6250s9k2/OlHHCmuL03sTqz+eC4GDLq7r0vKyNdb0orjAOPq1BOs8HMfYnNn1AMEfmr2+LHzzQ8PGHo2N0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707129504; c=relaxed/simple; bh=/QC8CAThaPcMyddwkEEQp4pIMysU99QBeEJYEmYBv94=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CEd1D07rZ+MSZPLYtMITUTS4BIyHPTVLGSxzZMAvTkHoZiQKfr60b2dvK3s6gJE7tskRn+e0Wu6yjsGv+5STk6Xw76JulBJ9WtQgiNhJVSYBfQ/0xywpf/SFi2QhtC2tVUyquVb+DKpf0WOsu1AKDhkMz13l9LRzTT+dP2+2MM0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90635C433C7; Mon, 5 Feb 2024 10:38:22 +0000 (UTC) Date: Mon, 5 Feb 2024 05:38:19 -0500 From: Steven Rostedt To: richard clark Cc: nico@fluxnic.net, Mark Rutland , mhiramat@kernel.org, linux-arm-kernel@lists.infradead.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Question about the ipi_raise filter usage and output Message-ID: <20240205053819.3cf848f0@rorschach.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 5 Feb 2024 17:57:29 +0800 richard clark wrote: > Hi guys, > > With the ipi_raise event enabled and filtered with: > echo 'reason == "Function call interrupts"' > filter, then the 'cat > trace' output below messages: > ... > insmod-3355 [010] ....1.. 24479.230381: ipi_raise: > target_mask=00000000,00000bff (Function call interrupts) > ... > The above output is triggered by my kernel module where it will smp > cross call a remote function from cpu#10 to cpu#11, for the > 'target_mask' value, what does the '00000000,00000bff' mean? > ~~~~~~~~~~~~~~ It's the CPU mask. bff is bits 101111111111 or CPUs = 0-9,11. > > Another question is for the filter, I'd like to catch the IPI only > happening on cpu#11 *AND* a remote function call, so how to write the > 'target_cpus' in the filter expression? > > I try to write below: > echo 'target_cpus == 11 && reason == "Function call interrupts"' > > events/ipi/ipi_raise/filter You mean when it is sent only to CPU 11? Not when the event is happening on CPU 11. Like the above example, the event was triggered on CPU 10, but the mask was for all the other CPUs. If you are looking for just CPU 11, you can do: echo 'target_cpus == 0x800 && reason == "Function call interrupts"' > > But the 'cat trace' doesn't show anything about cpu#11 IPI info, > although both the /proc/interrupts and the smp_processor_id() in the > remote function shows there's IPI sent to the cpu#11. > -- Steve