Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4915755ioa; Wed, 27 Apr 2022 14:16:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0qA3xASYIieUQA++QPnj/8sUTXsDoxDCbVE7/3BlzJobyFsrg2saMnTJXY4BzPa265jVu X-Received: by 2002:a17:90a:8d82:b0:1d2:cd8c:ed6 with SMTP id d2-20020a17090a8d8200b001d2cd8c0ed6mr35447242pjo.63.1651094198663; Wed, 27 Apr 2022 14:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651094198; cv=none; d=google.com; s=arc-20160816; b=GWsZyeyUm1TpVmqx0R9K+2pE2rTBVXXiqi97QPSMC55znBpAKUAue/NMKiX9roqlzb C++TSk/b4iV3MObGhB5MWm0q6UKJUSabPc5f1OKWlQNPQOn9lCVCsIKY9WqF4TvjND0E 74T9B2KFyJdzfTFU40pFN1UNAXSCN00/k5cS/FvVSZ/bLIR+Y2G+pVKNukJU4VdU/SM4 o0yU4DUMPL48Af5G3KYwaMm/al5F+qQlnSftLLWf/EkJDFE7Hbe4pCMbAtTfFbXVODSN xxUs+qK5ydo8ZWRo8DeTEXuaULzkkbPmwY4LCzawKUaEvYZdO4nwlV3XTWIbVw1ocbOU vDiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=rTA8jJf9AA5RlYMvaBE3R4oWy0zZygajljklA7XJzag=; b=TNQQx7FZ2uOGvrTc9J4xD//YnURZqfwWd6Sni2h2V5d4mPQbIv4KF0oLpZ06zn1ZWU Blf8zsYR6Fpvl1tDnaxj6tDjQdjynmZH8hGMIv3HZ/dGHk6fcvJtOvOUUhj32OmmVvT8 fbGQJa4vUEKRlYRciB3w5dBWt4ep4DO23QBrn/wsBFIwUJA/Z0ecQgkkZIOXJDhWSkil D5U1QFAyr38lZnq3B6hYwGk5Mp6RyqX6petwUHIg/eYaKudqtXTNwJYxAM9PnxKk/Oyb hHNbcSHKj1tLiEzi13StpczeentGgCok0jj1Le2r/kqz7zSJt0yCtVg6sfCBd2CLF2c3 Z+bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=mM4ICMJf; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=0L9v6aoj; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w64-20020a638243000000b003c16f6dbf3esi777167pgd.82.2022.04.27.14.16.22; Wed, 27 Apr 2022 14:16:38 -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=@linutronix.de header.s=2020 header.b=mM4ICMJf; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=0L9v6aoj; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236704AbiD0UqR (ORCPT + 99 others); Wed, 27 Apr 2022 16:46:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235863AbiD0UqN (ORCPT ); Wed, 27 Apr 2022 16:46:13 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6358C6459; Wed, 27 Apr 2022 13:43:00 -0700 (PDT) From: Kurt Kanzenbach DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651092179; 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: in-reply-to:in-reply-to:references:references; bh=rTA8jJf9AA5RlYMvaBE3R4oWy0zZygajljklA7XJzag=; b=mM4ICMJf4ZxV0WhY5GyOlCIUT/RgT/M51rGUg9fNOC38KV0zCEgLt5Nei0yH+hVsjSsWIM OT3X9gKh3DxC5FNsxCykriCIgm46wUeRZXlpf02cSnYx+DCOtIY87H9BGmdzoKjCGQdBfS hI/C9nkG/9WJlLuoO4klAv0R2kQx5NtrtHb1eXnsmBzJ54i3yYbAhsBOvM/uIFIbNV6d6h Mf8K158dE23wJbk3kgeMnDuFy1lkVrA5+pCdC43ZXDVgTQ56ky9sNX/irtpkZDm9kT7Vbd arRp4vJymtq4DthvJV/m8+dQVC/re64KFV6KD3Vm8OW5vn0DSrfBxYyIXri+eQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651092179; 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: in-reply-to:in-reply-to:references:references; bh=rTA8jJf9AA5RlYMvaBE3R4oWy0zZygajljklA7XJzag=; b=0L9v6aojyMJh/+MNxUBLkFOvo+i0292rxxHV9NBSXMeaJFOhItQIiRscaun5FOOf0w/2Tf iBqteUmuXhCpxaCQ== To: Steven Rostedt Cc: John Stultz , Thomas Gleixner , Stephen Boyd , Ingo Molnar , Jonathan Corbet , Richard Cochran , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] timekeeping: Introduce fast accessor to clock tai In-Reply-To: <20220427112759.1cedda69@gandalf.local.home> References: <20220414091805.89667-1-kurt@linutronix.de> <20220414091805.89667-2-kurt@linutronix.de> <20220426175338.3807ca4f@gandalf.local.home> <87r15i9azg.fsf@kurt> <20220427112759.1cedda69@gandalf.local.home> Date: Wed, 27 Apr 2022 22:42:57 +0200 Message-ID: <87fslyw94e.fsf@kurt> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed Apr 27 2022, Steven Rostedt wrote: > I'm able to trigger this on x86 64bit too. OK, reproduced it by using the function tracer (instead of events). Anyway, with your patch applied [1] and the one below it looks way better: | bash-4252 [003] ...1. 1651091299.936121: file_ra_state_init= <-do_dentry_open | bash-4252 [003] ...1. 1651091299.936121: inode_to_bdi <-fil= e_ra_state_init | bash-4252 [003] ...1. 1651091299.936121: do_truncate <-path= _openat | bash-4252 [003] ...1. 1651091299.936122: dentry_needs_remov= e_privs <-do_truncate | bash-4252 [003] ...1. 1651091299.936122: should_remove_suid= <-dentry_needs_remove_privs | bash-4252 [003] ...1. 1651091299.936122: security_inode_nee= d_killpriv <-dentry_needs_remove_privs | bash-4252 [003] ...1. 1651091299.936122: cap_inode_need_kil= lpriv <-security_inode_need_killpriv | bash-4252 [003] ...1. 1651091299.936123: __vfs_getxattr <-c= ap_inode_need_killpriv | bash-4252 [003] ...1. 1651091299.936123: xattr_resolve_name= <-__vfs_getxattr | bash-4252 [003] ...1. 1651091299.936123: is_bad_inode <-xat= tr_resolve_name | bash-4252 [003] ...1. 1651091299.936123: down_write <-do_tr= uncate | bash-4252 [003] ...1. 1651091299.936123: notify_change <-do= _truncate | bash-4252 [003] ...1. 1651091299.936123: may_setattr <-noti= fy_change | bash-4252 [003] ...1. 1651091299.936123: current_time <-not= ify_change | bash-4252 [003] ...1. 1651091299.936124: ktime_get_coarse_r= eal_ts64 <-current_time | bash-4252 [003] ...1. 1651091299.936124: security_inode_set= attr <-notify_change | bash-4252 [003] ...1. 1651091299.936124: selinux_inode_seta= ttr <-security_inode_setattr | bash-4252 [003] ...1. 1651091299.936125: inode_has_perm <-s= elinux_inode_setattr |/sys/kernel/debug/tracing # phc_ctl /dev/ptp0 get |phc_ctl[760.604]: clock time is 1651091302.512977591 or Wed Apr 27 22:28:2= 2 2022 Thanks for debugging it! [1] - https://lore.kernel.org/all/20220427153339.16c33f75@gandalf.local.hom= e/ Thanks, Kurt commit 81c4f2de420cc4ac08efc39e78ffd80e146bfbd7 Author: Kurt Kanzenbach Date: Wed Apr 27 21:59:58 2022 +0200 timekeeping: Mark mono fast time accessors as notrace =20=20=20=20 Mark the CLOCK_MONOTONIC fast time accessors as notrace. These function= s are used in tracing to retrieve timestamps. =20=20=20=20 Signed-off-by: Kurt Kanzenbach diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 2c22023fbf5f..dddc37035215 100644 =2D-- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -482,7 +482,7 @@ static __always_inline u64 __ktime_get_fast_ns(struct t= k_fast *tkf) * of the following timestamps. Callers need to be aware of that and * deal with it. */ =2Du64 ktime_get_mono_fast_ns(void) +u64 notrace ktime_get_mono_fast_ns(void) { return __ktime_get_fast_ns(&tk_fast_mono); } @@ -494,7 +494,7 @@ EXPORT_SYMBOL_GPL(ktime_get_mono_fast_ns); * Contrary to ktime_get_mono_fast_ns() this is always correct because the * conversion factor is not affected by NTP/PTP correction. */ =2Du64 ktime_get_raw_fast_ns(void) +u64 notrace ktime_get_raw_fast_ns(void) { return __ktime_get_fast_ns(&tk_fast_raw); } --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCgAxFiEEvLm/ssjDfdPf21mSwZPR8qpGc4IFAmJpqtETHGt1cnRAbGlu dXRyb25peC5kZQAKCRDBk9HyqkZzgqHED/0ZjWkFpI8PVENtmyoz1uaWIYDcxajq 2gqUnkBzQAsHnNzfNqPpWcf9VD1G95pZGos86jjRWuOIV7b36EB4ogP1+aJKfqxF a2FAu5UQKyKvgtsMRLhUwkTqNFw8ltSOMjNn0oi6rzvHNDuwcU8F4XyvXZ7XENWr ckxLdtr0uBTVg7+Jg9ZdQF4uuOLMa+TWThmOkPGmL4wgvZIVa5kwCYAfkMhzcYao tngqe2PhnH2RW0i5afm8AiEvVcCnP007MkD1Nfe8I9C2kng417fcmctP2OkwukdM TgKWqhTRGa2dlNl32P8WnvSywJIhR7dw1GdnkJq8p0FEvROxHg8WRvtTQgHbitob LBQvrCT85JARlmt/BFtfK5dKmsq71f7ZNv82GiJCIenSvMduMmO7Z+iC9JvR3eNx QVoZdJTZBK63ZzG9dPhFf2bgzqamxyX7YBuVG7d3DWaglBMhqu4w1pLe7O3eHt+P OhHpbHSVqrdlGmABNSG55Zgu5UVh6cSF2YbsDkOOKyAYSxsDqcAmceZq1DaqKRtw dWFX/0hcCXOKbfvCjNTh3m/OvlGJek+fXlooshY/gW13/P/KGI4qq9JOpvjpzihD eGuv9mzVbUvIjqIIkI3gnUHIGZH1dGEazdSD4jbT2ceDnjOFlwhCqr2T1oLsQywT 8X4DJSpMAvGcCQ== =v69O -----END PGP SIGNATURE----- --=-=-=--