Message ID | 20221103200359.328736-25-mathieu.desnoyers@efficios.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp753101wru; Thu, 3 Nov 2022 13:29:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5fXfrKJVsM9KhmRGLoe79CmSjVtTTHxt5+5AH4dqAtbLnteSGU4k6sXFbpH7xZiqNg1rpw X-Received: by 2002:a17:902:d48b:b0:188:50af:ea11 with SMTP id c11-20020a170902d48b00b0018850afea11mr6312298plg.69.1667507353880; Thu, 03 Nov 2022 13:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667507353; cv=none; d=google.com; s=arc-20160816; b=tjFMoUej99sVlZ6JHstOQrUftXNSbAI9bukqvTeRoFVoEZEDx9qsakc6zrQiaJgvVU JGPd75iWQtdjDS/hfzAeQyXhEq4r3SkRA3UNcsX7ucCeNmmYrF4q32MYsw5jJuUNzbM6 9+Izh9Z94QxNmEK5h5+cYZNr30q1tLvCsXxith3FAN/dDU/xm4nkXJvWYPCuWx7uxFQu cQq4Pqpr0i636XqO5YB1fYSRQ2I8MyQz6UNwtBNBehsJB6fM2HfEozmpOBvi/KcFZBlt 7Y2ldeIDNnY0wTylbhLWmiE4XR66wWssspU9ovwwRyVKLSSg+X8y4uh4FzyW6y9l/saH lhcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6wZqOwBg6XiUXuMbIBbhsQRVBve1Gtg+LcTlrBEXirk=; b=Mgdw3FqV6PzzFh9ZTVC5fluncJij6PYm62xgLfoIM6QafTgSH+67KVd5pBdwq03zlD voJ8IhrTjiefRv3b3GX2lOIHIOcLFPhJkwHL/iqsessXQREqCHPSw7HGQqH/M15gxAuK Bx9PPhVrLCW6NU0rVwjFZ2haieUhefgrUbYo95o/6/zxd2VtCj+l2175cRpr0JCN1yYM Pgi12IVJU695sH+n/flWC9A5UMVdcE2aMbnte28hmvLMl/NXhnT75n8ZUfwOuqAfwX97 TICPZS4uL6UwDKKbm5zuZGyQJJruLDKDlNVYnSU1Ca9UT66l6NcU3rAEbROi+ANa4Gwd /U6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=PWQg3Ja0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a631c07000000b0043adff6d43dsi2213490pgc.583.2022.11.03.13.29.00; Thu, 03 Nov 2022 13:29:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=PWQg3Ja0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231779AbiKCUGk (ORCPT <rfc822;yves.mi.zy@gmail.com> + 99 others); Thu, 3 Nov 2022 16:06:40 -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 <rfc822;linux-kernel@vger.kernel.org>); 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 <mathieu.desnoyers@efficios.com> To: Peter Zijlstra <peterz@infradead.org> Cc: linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>, "Paul E . McKenney" <paulmck@kernel.org>, Boqun Feng <boqun.feng@gmail.com>, "H . Peter Anvin" <hpa@zytor.com>, Paul Turner <pjt@google.com>, linux-api@vger.kernel.org, Christian Brauner <brauner@kernel.org>, Florian Weimer <fw@deneb.enyo.de>, David.Laight@ACULAB.COM, carlos@redhat.com, Peter Oskolkov <posk@posk.io>, Alexander Mikhalitsyn <alexander@mihalicyn.com>, Chris Kennelly <ckennelly@google.com>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com> 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: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748508191192541315?= X-GMAIL-MSGID: =?utf-8?q?1748508191192541315?= |
Series |
RSEQ node id and virtual cpu id extensions
|
|
Commit Message
Mathieu Desnoyers
Nov. 3, 2022, 8:03 p.m. UTC
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 <mathieu.desnoyers@efficios.com>
---
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) ), TP_fast_assign( __entry->cpu_id = raw_smp_processor_id(); __entry->node_id = cpu_to_node(__entry->cpu_id); + __entry->mm_vcpu_id = task_mm_vcpu_id(t); ), - TP_printk("cpu_id=%d node_id=%d", __entry->cpu_id, __entry->node_id) + TP_printk("cpu_id=%d node_id=%d mm_vcpu_id=%d", __entry->cpu_id, + __entry->node_id, __entry->mm_vcpu_id) ); TRACE_EVENT(rseq_ip_fixup,