From nobody Thu Apr 2 18:03:37 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35033C4332F for ; Thu, 3 Nov 2022 20:06:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231783AbiKCUGn (ORCPT ); Thu, 3 Nov 2022 16:06:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231406AbiKCUFQ (ORCPT ); Thu, 3 Nov 2022 16:05:16 -0400 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 966E720351; Thu, 3 Nov 2022 13:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1667505904; bh=aR1TngvqLe/BAXphPiGrYuVRVX1HfRtNdx1hDFAPet4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PWQg3Ja08w7tehAIfnZJG2X+jbNNV0LOW/2QASiuHNfAM2VmmZGoY/+YIrT/Di+eI 6DsA/+fJZU166nuFx2aXOatrryNqphLlbt2+Se9KDHhhPT1U/i2vevLjTRWX9uK6X4 KIDFEAIyqnvbN58iYWGQFuh6eeumXa7Yh+uJuLeP44zayVMoN3SAcX6+y1iDy145m/ 22s9A/svxDSfCFIGbNUe7lJ9MDifyIRxQ7h+CW8ZCMT4E9OBk/iCiS7Q+iPQSqMTq7 CDDbXTDa+pDg6zPqk+mRsBvUfuE/6/bzkpGh8n/CYl1vef5EQzwu27jDdZSRFpJk2o QUlzpj03S6zmg== Received: from localhost.localdomain (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4N3F9D3PmYzg72; Thu, 3 Nov 2022 16:05:04 -0400 (EDT) From: Mathieu Desnoyers To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , "Paul E . McKenney" , Boqun Feng , "H . Peter Anvin" , Paul Turner , linux-api@vger.kernel.org, Christian Brauner , Florian Weimer , David.Laight@ACULAB.COM, carlos@redhat.com, Peter Oskolkov , Alexander Mikhalitsyn , Chris Kennelly , Mathieu Desnoyers Subject: [PATCH v5 24/24] tracing/rseq: Add mm_vcpu_id field to rseq_update Date: Thu, 3 Nov 2022 16:03:59 -0400 Message-Id: <20221103200359.328736-25-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221103200359.328736-1-mathieu.desnoyers@efficios.com> References: <20221103200359.328736-1-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add the mm_vcpu_id field to the rseq_update event, allowing tracers to follow which vcpu_id is observed by user-space, and whether negative vcpu_id values are visible in case of internal scheduler implementation issues. Signed-off-by: Mathieu Desnoyers --- Changes since v4: - use task_mm_vcpu_id() to get the mm_vcpu_id from the task struct. --- include/trace/events/rseq.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/trace/events/rseq.h b/include/trace/events/rseq.h index dde7a359b4ef..9106148227c0 100644 --- a/include/trace/events/rseq.h +++ b/include/trace/events/rseq.h @@ -17,14 +17,17 @@ TRACE_EVENT(rseq_update, TP_STRUCT__entry( __field(s32, cpu_id) __field(s32, node_id) + __field(s32, mm_vcpu_id) ), =20 TP_fast_assign( __entry->cpu_id =3D raw_smp_processor_id(); __entry->node_id =3D cpu_to_node(__entry->cpu_id); + __entry->mm_vcpu_id =3D task_mm_vcpu_id(t); ), =20 - TP_printk("cpu_id=3D%d node_id=3D%d", __entry->cpu_id, __entry->node_id) + TP_printk("cpu_id=3D%d node_id=3D%d mm_vcpu_id=3D%d", __entry->cpu_id, + __entry->node_id, __entry->mm_vcpu_id) ); =20 TRACE_EVENT(rseq_ip_fixup, --=20 2.25.1