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.129.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 65C13347FC4 for ; Thu, 11 Jun 2026 20:49:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781210959; cv=none; b=asG9vMPitfPSM79ug4lPnD5G8h4czyBywsXQ+ZLQ/GiatXBxg2G8V+vWkazIfEqH8GfDgTAU4pSao2opFlDvtMba6z+S+wVnQNUpBDrpaCMWhiuksughv3nlfxr6EwegW9iu3l0bIMOgNpFlq5k+9wco1pCVqgiDNALxRAb6eS4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781210959; c=relaxed/simple; bh=5hOHi9t8eWvhak32t4WLHOEeSPNgnnXI2tqmdR/ET2I=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=oCSw+/afwECnLPmHJPEQ7+J9oRdu92tlShTSu/e+20/gtGNJUioaWK+bsEVkoCfyDwSdsyYoOsFGnpE0lDijVtTNtyPv/UEnoD9OLHWD8Le3EBPjenayXqurF0eNNJrDN9CEJH8DwV1SMH+U2hpNmWJy3wkvoBkve7w0F4iPgS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=JbjeYhqc; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=SaReE5tp; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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="JbjeYhqc"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="SaReE5tp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781210957; 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; bh=wgktEKfzuJsITNJ+8XhsgZmhYbupv7GRDCn0xvz14pw=; b=JbjeYhqcT2JlEwoUUi+KAUhkJNxBaSMkBJ6mLiVghg6eK2XZsXplWmwiiUxkCmzGl+1aYe uwxhmpCOABBtT4DQNQLMnlL3ASlH1PwPA/HRnqD/5OdOwk/sUsyulJ0RkVozJWNp4XzRZS jwtGIP9tUtLkI9gA5+60l0jG+5HanpI= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-497--IkUhkBpNhGlrPQttkxwuQ-1; Thu, 11 Jun 2026 16:49:16 -0400 X-MC-Unique: -IkUhkBpNhGlrPQttkxwuQ-1 X-Mimecast-MFC-AGG-ID: -IkUhkBpNhGlrPQttkxwuQ_1781210956 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-91571300242so270482985a.1 for ; Thu, 11 Jun 2026 13:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1781210956; x=1781815756; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=wgktEKfzuJsITNJ+8XhsgZmhYbupv7GRDCn0xvz14pw=; b=SaReE5tpvcHH2wHRM7t8tSrsRtImgPsmdu3878UmlIjOj1QPQcjxk/yTx6bX9EKg4g K/pG8C38PLhCK+pRaJVWdctdzyf+1EmddkMlP4KR9b2CaO+GltmqkNk1HeV2WHl80x0G JCeFt72HkdO6ZphK5LIW4NPglln0yQRL2kdKcjPSxrWHtZNh+2blhWYeuoSDA+avZHDm kUFseqfYQxmOkTQBTTbFXgjqeHBzz5r4ObAQ1vs/eBqBohOFVEiw00tlXJT4c9rhTdt3 BYB5rpF+xFfVWk23S4ZWQIKeoGXKtUMIAV42Kum69JxSQAYyB/bUIcE6JNa1A3ha6EqQ VyKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781210956; x=1781815756; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wgktEKfzuJsITNJ+8XhsgZmhYbupv7GRDCn0xvz14pw=; b=eo4b9ao0PLyJoBFP9oYjOmptuZN8v0tOalmIYv9Z1I0OBVC1EmaRuPM8XdvdNGawxF 1XpKX6e79KvVfkUY6B2ThtkGSrbcpYBQe5uxKSS1ZOYJKT7yAkIWK0SQV0I5uZ2gR+ye abQvttqcdafSnEyd2lC/u0McjJygapEQdOQcVYgQV4h+TteSm5XtwuL4b8caC7JcPq1v 8OFW74XBm1yvm+J2ZJ1ehIF/bKz356vVKW/TJUDlYqUbnH6xzQTaCFpRapCP9Yx5XHwh dP1mjZWQsHtHLpW9cpXs/BCAldOu7/ka9LHSuKrUZiVDxUk63MHwGfRhEH9tzBMiJHHA gJUA== X-Gm-Message-State: AOJu0YzArBglJ9yKIzN0bSs45hRpP5uI9pgPjniSdiCEjwvdzRhwiM8I gwjDwvQu1dXnD+600f35z70KleRpo/CkixMGSqwkT4QbSL5icE4m5t8qIhKJAc0GadO84CdKMLN pzJzb6HopvEdk8GGBnpbw0O7u5BLTvpr6u0Q0sd/SJgav0k2+aiUoZFzUIKWgAl/ADQ== X-Gm-Gg: Acq92OGll5M8Cdejnvc0K08WkIGgyTwz7/VXzZ4V11YobU2/m5/qTiUtqa40T/RUXqx hlWgI3EP7h7pZmvs5PofJM2TMLJdjXfmBbd7WbbbAAKWtHRHfOIC7xXd9CHHTl518vIYanOHq6M q/K6g3KeYQqG43AK4maKwUCrzoq8MH3y9zEhRTfY2Ic23KxhuSI3bc9G/4+GMsCSTG3BnqFbrm8 FNABoNhhx6a/DIez3DASDjE/S3jLyhyDgKmnzT4SnLk/l5DPVAIXdXDowmBZSlELzysCyT3NOX2 N4D829JIfJCxXWsQOteiEcg4U53UAD0vig8u22mXXNGy+dh6lfFA495bs9ERQQc1EbGTwQ+9RaN bw4cHbcqPHPI0x6vl34PoomuCTpp+iV8zGBnuHw/Yg31U3wp9MkM11A== X-Received: by 2002:a05:620a:2954:b0:915:351b:3ad5 with SMTP id af79cd13be357-9161a3cbedbmr33292785a.29.1781210955608; Thu, 11 Jun 2026 13:49:15 -0700 (PDT) X-Received: by 2002:a05:620a:2954:b0:915:351b:3ad5 with SMTP id af79cd13be357-9161a3cbedbmr33287985a.29.1781210955151; Thu, 11 Jun 2026 13:49:15 -0700 (PDT) Received: from crwood-thinkpadp16vgen1.minnmso.csb ([2601:447:cc81:56d0:ab94:b2cb:29a6:7ac0]) by smtp.gmail.com with ESMTPSA id af79cd13be357-91619f210b7sm21254885a.18.2026.06.11.13.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 13:49:14 -0700 (PDT) Message-ID: Subject: Re: [RFC PATCH 1/2] tracing/osnoise: Sample IPI counts From: Crystal Wood To: Valentin Schneider , Tomas Glozar Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Costa Shulyupin , Ivan Pravdin Date: Thu, 11 Jun 2026 15:49:13 -0500 In-Reply-To: References: <20260610130457.1304245-1-vschneid@redhat.com> <20260610130457.1304245-2-vschneid@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.1 (3.60.1-1.fc44) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2026-06-11 at 12:30 +0200, Valentin Schneider wrote: > On 11/06/26 10:59, Tomas Glozar wrote: > > [just replying to comments, will do a full review later] > >=20 > > st 10. 6. 2026 v 21:51 odes=C3=ADlatel Crystal Wood = napsal: > > >=20 > > > On Wed, 2026-06-10 at 15:04 +0200, Valentin Schneider wrote: > > > > Osnoise already implictly accounts IPIs via its IRQ tracking, > > >=20 > > > Does it? It seems that IPIs bypass the kernel/irq subsystem on some > > > arches (including x86, but not ARM). > > >=20 > > > It would be nice to solve this properly by adding generic ipi > > > entry/exit tracing (similar to what ARM already has). > > >=20 > >=20 > > Isn't that precisely what the ipi tracepoints used by this > > implementation (ipi:ipi_send_cpu) are for? > >=20 >=20 > Well, these catch the emission of the IPI, which is great for investigati= on > - slap a stacktrace trigger and you (most of the time) get the source of > your interference. >=20 > However Crystal's point is that on x86 (and I assume other archs) receivi= ng > & handling these IPIs is "special" and doesn't go through the generic irq > subsystem and thus has to be tracked separately, which is why osnoise has > this fairly lengthy osnoise_arch_register() thing. Oh, I missed the arch hook. I feel better now :-) (I'd feel better if it didn't rely on osnoise-specific arch code being updated to match if some new interrupt path pops up, but oh well.) > >=20 > > > > Alternatively I can have this be purely supported in userspace osno= ise by > > > > hooking into the IPI events and counting IPIs separately from the o= snoise > > > > events. > > >=20 > > > One benefit I could see of doing this in kernel osnoise would be if y= ou > > > could atomically correlate the count with the particular noise > > > interval, but this patch doesn't do that. > > >=20 > >=20 > > The count is already reported by cycle on the kernel side in the > > patchset, right? It's only missing in the current RTLA (userspace) > > part, as there is no statistic using the information. But it can still > > be collected through custom histogram triggers. Not sure I follow... this patchset reports a count of IPIs, not cycle info, but the count is based on when the IPIs were sent, not received.=20 The IPI send events capture cycle info, but that's not what this patchset adds. I'm not sure that it really matters though. I had been thinking of this more like the interference count, which is atomic with respect to a single noise (and thus the sender of the noise would be outside that window). But this count is reported over the entire osnoise sample period, so a little slop is probably OK. -Crystal >=20