Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6431013rwb; Tue, 22 Nov 2022 13:18:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf43wEpkuVuPzGOCTZ/J9q4A9Pg/PwwDyX+FbzFTGvDZGus1egtK/QZq/AuA5z93+FNQCsG8 X-Received: by 2002:a17:906:3385:b0:7a2:b352:a0d3 with SMTP id v5-20020a170906338500b007a2b352a0d3mr20813485eja.399.1669151924335; Tue, 22 Nov 2022 13:18:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669151924; cv=none; d=google.com; s=arc-20160816; b=VqVCrLiAe0C/vVyhjl0LaljJoCAH8+KfsdWB/k+b4r6d6tF1or+fmdWgfE26C8swe6 xJWat1NLHNIJIqT2D0F/bIr5eIimmP+qks1iB9H0w//g70nxME8d/hBOQdXFB4liaUjC DS3dIpa0JlCfG1i6HAeI6eOQB8tTbUDYwxEOxeqmjiRwb9PuHZC72fTGn4YImMAxrfak +iJX/IyY50OIhAedEAdk5LwCZBHBYtpKqAPY19dzeNvkNPhytSxO5hqPczb0ieyMlj0U cIZxDVc5eqCQ6vZDWVpTBtk7vKLP40vl6S0pAA4Ht4Cr8zYpfJXAZCdGtpxverl4Qv1f 6jkQ== 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=W7jmX+FThLeVpi+3BhWz0w+d1KV5RehgTEmg2RUMq2s=; b=vRfJI8IyTjNQceUljvKXiqVolgWL5iEiACFJ9NwKM5KbedwVqFOBfCKVIsfxQPnfR0 Hj8CRmQAILH6jG8BFLNe3wVv+1PDrGx76bFVPjjnq2fms/igwnhkvfUDAhw8T8NpxDBh S0jAGp3kXPASIAc3dsRG4T15DTO51r2b4w2qQAqLqasmBMOKDag0ioF7G+vPNJqHWj7v kIALqkzHIt2I7s98XiNMHFFVkMpsMyrJBaslR7lTwJwzSa6xl4o8axguT/37h2cRQyGj 3JN+KCAI1EotMztlJHaayWzVIc5zkckerMH9MGCRnF0jT8B7YVRmCbfcU0vtjOasiLbM cp4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=KO6Zo8Ff; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm14-20020a170907948e00b0078da856a4ecsi13527327ejc.391.2022.11.22.13.18.21; Tue, 22 Nov 2022 13:18:44 -0800 (PST) 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=KO6Zo8Ff; 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 S235085AbiKVUlq (ORCPT + 89 others); Tue, 22 Nov 2022 15:41:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234926AbiKVUj5 (ORCPT ); Tue, 22 Nov 2022 15:39:57 -0500 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B99D697D9; Tue, 22 Nov 2022 12:39:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1669149593; bh=7vURJNeXW9U22SN33WMla8+qcI4XLD3d3buEpebC6PI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KO6Zo8FfRfpxU3iNEwBJS8Lx1YxD9DnJ9LJL5kQ9gwyfcbW2fnKno/VlROUxSmcS2 IOeckpiiQzEGPEQlOEtN9Bu9bngTntC3umbr+YEscCP2z0GfRC/t+Zbfsr8LNDx5B1 zRx6pkIXVl1/9F6flzkgPQ8qBfKvT5okAZzCKejZjXN0UUtOnZliRlirNGb8f0FURz /tnQCWcL7DDS2T5He78GIHUFQ9cmdeU4fhhsnAkNzNcp3zwYPYegMLL9hFAvXZI+OS 3jfmFzd82pX46H7B8kd9q5mCLSEvM6Y4WXia+bRebXaAmzp65U5kOnr36yB8Zd9Z6A Su92sdhQw0amQ== Received: from localhost.localdomain (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4NGx2d1FZrzXP8; Tue, 22 Nov 2022 15:39:53 -0500 (EST) 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 21/30] tracing/rseq: Add mm_cid field to rseq_update Date: Tue, 22 Nov 2022 15:39:23 -0500 Message-Id: <20221122203932.231377-22-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221122203932.231377-1-mathieu.desnoyers@efficios.com> References: <20221122203932.231377-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: X-Mailing-List: linux-kernel@vger.kernel.org Add the mm_cid field to the rseq_update event, allowing tracers to follow which mm_cid is observed by user-space, and whether negative mm_cid 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. Changes since v5: - rename vcpu_id to mm_cid. --- 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..823b47d1ba1e 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_cid) ), TP_fast_assign( __entry->cpu_id = raw_smp_processor_id(); __entry->node_id = cpu_to_node(__entry->cpu_id); + __entry->mm_cid = task_mm_cid(t); ), - TP_printk("cpu_id=%d node_id=%d", __entry->cpu_id, __entry->node_id) + TP_printk("cpu_id=%d node_id=%d mm_cid=%d", __entry->cpu_id, + __entry->node_id, __entry->mm_cid) ); TRACE_EVENT(rseq_ip_fixup, -- 2.25.1