Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp36115lfe; Fri, 15 Apr 2022 18:13:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcAZW6I4a8ztUnQ03Fz+AbGSN1T1XtolB3QTEKLFb+wn7mAzE1K0kGtQUbdFVev1IQhU3f X-Received: by 2002:a65:56cb:0:b0:378:82ed:d74 with SMTP id w11-20020a6556cb000000b0037882ed0d74mr1217864pgs.491.1650071602414; Fri, 15 Apr 2022 18:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650071602; cv=none; d=google.com; s=arc-20160816; b=KFged841A+b9YQ8WFB+a4Se5tczWo+8wSC+h41CnoGSa0alhB6zKXre7A+AQL/iV3S QNmGNH5yXLlG3N3B2TYHdlbq4jFN65btX2G4IhQJZrrYwKI1hKZSCYo9OjEKK7Wr9ROl hXpf7bC//DJ9CN1ooAuT40D2ILAAjq8+12sdT6iq0Fqy2S9WmliglMOMTu2Ui8+ouUJY +lTwl684ZurmeivKFr6p1bpkF4t+57ln6+BwzKqBEJmJuMX3rjlQ6Ah2D+fCkvFhu5Nh JvacXUiHf8uhPjRYxRXIUekbH90kJ9IYorVfrubtOXp3lWwfd0SC5NfbjBQLCqRlXbMv 2yFQ== 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 :message-id:date:subject:cc:to:dkim-signature:dkim-signature:from; bh=VKYOKsNdtO2aGH0r6q2BwEHQC1rQZ88mXZkktgYJ4/M=; b=a94g0/fVzl8EwNe68wHsARiiPqMJSg+Ptxt279o5IA11DLj7SPCQW4JrAqY4EUa8KI NplZsp9frYvsFL2MzEsg4TwTOXQnwxDTZklbAbItQ8PqAbmXnr56SgugAObV+AyxKl+N 2qN2fRv4CT3QLxon1e0mHEWi/9xTe8A/qaRXkl0K68KGo3SKrz+FVr/+Ii499K8QNzt3 nmDdMTJ5u8XkfoPhMAzCzpOEIOoRMQdsUz9N6swQwwROxVQ8WrfZeESb448gU9nC99kz dhDq/L5k+oDR/BMI5Lc6I66BvotVArYL9NQXgTp0133tTtiyqX3RIYoOZ4FHF/YUgiX2 8rhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fMEDdqLD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=sero7Ruh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b12-20020a65668c000000b003816043f130si2642425pgw.805.2022.04.15.18.13.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:13:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fMEDdqLD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=sero7Ruh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E06A888E2; Fri, 15 Apr 2022 17:50:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241162AbiDNJUq (ORCPT + 99 others); Thu, 14 Apr 2022 05:20:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241358AbiDNJUi (ORCPT ); Thu, 14 Apr 2022 05:20:38 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25B1A50B34; Thu, 14 Apr 2022 02:18:14 -0700 (PDT) From: Kurt Kanzenbach DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1649927892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=VKYOKsNdtO2aGH0r6q2BwEHQC1rQZ88mXZkktgYJ4/M=; b=fMEDdqLD67Im0YAB13eH/+DEbam1jQociwxB96JNa3zPzdM6DQqjoG1jroCoSV2nnnwkBH fLKur5K2WWkZ2qAOtUUboTc/+1T0Dphvz0hHIYbur9ZNZX/pvnAdYRkiEUxMGDvUFsysee siMxqZzxKrO0F4B1YJAGDvM0Vm2GxSEoLNQyOAwiJTjEwUKfu5TmSjAd0y8COHgIUanJ7s fERMeFkrqtIEjBaDl2J/UCGf25sLTQ9kHVlCBdIzVBqq2L0MBrJ5OClTD0n41yxOE5UmFS 4u91nEvC4UadJOZslVkHhy416tn1ZXlPGH+cgwH1ZvWgVQG5QSgHmu/9mUizyA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1649927892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=VKYOKsNdtO2aGH0r6q2BwEHQC1rQZ88mXZkktgYJ4/M=; b=sero7Ruh9jP3d3VowrepRmpjg7HgtFyrarLTJ3Ys29MkDnSdA84oPsf2bygzOdsNcBl9de euYeBzXWygmu/5BQ== To: John Stultz , Thomas Gleixner , Stephen Boyd , Steven Rostedt , Ingo Molnar , Jonathan Corbet Cc: Richard Cochran , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Kurt Kanzenbach Subject: [PATCH v2 0/3] tracing: Introduce trace clock tai Date: Thu, 14 Apr 2022 11:18:02 +0200 Message-Id: <20220414091805.89667-1-kurt@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi, the Linux kernel tracing infrastructure has support for using different clocks to generate timestamps for trace events. Especially in TSN networks it's useful to have TAI as trace clock, because the application scheduling is done in accordance to the network time, which is based on TAI. With a tai trace_clock in place, it becomes very convenient to correlate network activity with Linux kernel application traces. However, there's no fast accessor for CLOCK_TAI yet. Therefore, patch #1 is adding one. Patch #2 introduces the clock and the last one adds documentation for it. Changes since v1: - Add missing data_race() annotation for TAI offset which is accessed without any form of locking for KCSAN (Thomas) - Add missing documentation entry for ktime_get_tai_fast_ns() - Minor changelog tweaks Previous versions: - https://lore.kernel.org/all/20220409081300.4762-1-kurt@linutronix.de/ Thanks, Kurt Kurt Kanzenbach (3): timekeeping: Introduce fast accessor to clock tai tracing: Introduce trace clock tai tracing: Add documentation for trace clock tai Documentation/core-api/timekeeping.rst | 1 + Documentation/trace/ftrace.rst | 12 ++++++++++++ include/linux/timekeeping.h | 1 + kernel/time/timekeeping.c | 17 +++++++++++++++++ kernel/trace/trace.c | 1 + 5 files changed, 32 insertions(+) -- 2.30.2