linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kurt Kanzenbach <kurt@linutronix.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: John Stultz <john.stultz@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Stephen Boyd <sboyd@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Richard Cochran <richardcochran@gmail.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] timekeeping: Introduce fast accessor to clock tai
Date: Wed, 27 Apr 2022 22:42:57 +0200	[thread overview]
Message-ID: <87fslyw94e.fsf@kurt> (raw)
In-Reply-To: <20220427112759.1cedda69@gandalf.local.home>

[-- Attachment #1: Type: text/plain, Size: 3467 bytes --]

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 <-file_ra_state_init
|            bash-4252    [003] ...1. 1651091299.936121: do_truncate <-path_openat
|            bash-4252    [003] ...1. 1651091299.936122: dentry_needs_remove_privs <-do_truncate
|            bash-4252    [003] ...1. 1651091299.936122: should_remove_suid <-dentry_needs_remove_privs
|            bash-4252    [003] ...1. 1651091299.936122: security_inode_need_killpriv <-dentry_needs_remove_privs
|            bash-4252    [003] ...1. 1651091299.936122: cap_inode_need_killpriv <-security_inode_need_killpriv
|            bash-4252    [003] ...1. 1651091299.936123: __vfs_getxattr <-cap_inode_need_killpriv
|            bash-4252    [003] ...1. 1651091299.936123: xattr_resolve_name <-__vfs_getxattr
|            bash-4252    [003] ...1. 1651091299.936123: is_bad_inode <-xattr_resolve_name
|            bash-4252    [003] ...1. 1651091299.936123: down_write <-do_truncate
|            bash-4252    [003] ...1. 1651091299.936123: notify_change <-do_truncate
|            bash-4252    [003] ...1. 1651091299.936123: may_setattr <-notify_change
|            bash-4252    [003] ...1. 1651091299.936123: current_time <-notify_change
|            bash-4252    [003] ...1. 1651091299.936124: ktime_get_coarse_real_ts64 <-current_time
|            bash-4252    [003] ...1. 1651091299.936124: security_inode_setattr <-notify_change
|            bash-4252    [003] ...1. 1651091299.936124: selinux_inode_setattr <-security_inode_setattr
|            bash-4252    [003] ...1. 1651091299.936125: inode_has_perm <-selinux_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:22 2022

Thanks for debugging it!

[1] - https://lore.kernel.org/all/20220427153339.16c33f75@gandalf.local.home/

Thanks,
Kurt

commit 81c4f2de420cc4ac08efc39e78ffd80e146bfbd7
Author: Kurt Kanzenbach <kurt@linutronix.de>
Date:   Wed Apr 27 21:59:58 2022 +0200

    timekeeping: Mark mono fast time accessors as notrace
    
    Mark the CLOCK_MONOTONIC fast time accessors as notrace. These functions are
    used in tracing to retrieve timestamps.
    
    Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 2c22023fbf5f..dddc37035215 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -482,7 +482,7 @@ static __always_inline u64 __ktime_get_fast_ns(struct tk_fast *tkf)
  * of the following timestamps. Callers need to be aware of that and
  * deal with it.
  */
-u64 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.
  */
-u64 ktime_get_raw_fast_ns(void)
+u64 notrace ktime_get_raw_fast_ns(void)
 {
        return __ktime_get_fast_ns(&tk_fast_raw);
 }

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  parent reply	other threads:[~2022-04-27 20:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14  9:18 [PATCH v2 0/3] tracing: Introduce trace clock tai Kurt Kanzenbach
2022-04-14  9:18 ` [PATCH v2 1/3] timekeeping: Introduce fast accessor to " Kurt Kanzenbach
2022-04-14 14:59   ` Thomas Gleixner
2022-04-18 17:15     ` Steven Rostedt
2022-04-26 21:53   ` Steven Rostedt
2022-04-27  8:17     ` Thomas Gleixner
2022-04-27  8:38     ` Kurt Kanzenbach
2022-04-27 15:27       ` Steven Rostedt
2022-04-27 17:22         ` Steven Rostedt
2022-04-27 19:23           ` Steven Rostedt
2022-04-27 20:06         ` Thomas Gleixner
2022-04-27 20:08           ` Steven Rostedt
2022-04-27 20:42         ` Kurt Kanzenbach [this message]
2022-04-27 21:05           ` Steven Rostedt
2022-04-27 21:12           ` Thomas Gleixner
2022-04-14  9:18 ` [PATCH v2 2/3] tracing: Introduce trace " Kurt Kanzenbach
2022-04-14  9:18 ` [PATCH v2 3/3] tracing: Add documentation for " Kurt Kanzenbach
2022-04-14 11:27   ` Bagas Sanjaya
2022-04-14 11:38     ` Kurt Kanzenbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fslyw94e.fsf@kurt \
    --to=kurt@linutronix.de \
    --cc=corbet@lwn.net \
    --cc=john.stultz@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=rostedt@goodmis.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).