All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Pavel Tatashin <pasha.tatashin@oracle.com>
Subject: Re: [RFC] tick_sched_timer() is not properly aligned, fixed by chance
Date: Thu, 06 Apr 2023 19:13:41 +0200	[thread overview]
Message-ID: <87jzypq6gq.ffs@tglx> (raw)
In-Reply-To: <20230406150254.ZrawA2Y-@linutronix.de>

On Thu, Apr 06 2023 at 17:02, Sebastian Andrzej Siewior wrote:
> On 2023-04-06 13:08:29 [+0200], Thomas Gleixner wrote:
> The first one added is hpet. It points to "jiffies" as name and
> jiffies_read() as ->read().
>
> Before the change/ with PeterZ change I get from ktime_get() for
> base/nsec something like:
> |[    0.004000] tick_next_period Name: jiffies jiffies_read+0x0/0x10
> |[    0.004000] tick_next_period base/nsec: -401771248 405771248
> |[    0.004000] tick_next_period hpet 4000000
>
> base/nsec is different on each boot but it always ends up with 4000000.
> With the optimisation, ktime_get() is:
> | [    1.179079] tick_next_period base/nsec: 647439581 518613145
> | [    1.179646] tick_next_period hpet 1166052726
>
> so something is using it during init. And this is
> 	read_persistent_wall_and_boot_offset()

Duh, yes. I remember now. That was done to take the TSC "uptime" into
account, which is sensible.

So making tick_next_period aligned to TICK_NSEC in tick_setup_device()
is the right thing to do in general then.

Thanks,

        tglx

  reply	other threads:[~2023-04-06 17:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06  9:57 [RFC] tick_sched_timer() is not properly aligned, fixed by chance Sebastian Andrzej Siewior
2023-04-06 10:55 ` Peter Zijlstra
2023-04-06 11:08   ` Thomas Gleixner
2023-04-06 15:02     ` Sebastian Andrzej Siewior
2023-04-06 17:13       ` Thomas Gleixner [this message]
2023-04-18 12:26         ` [PATCH] timekeeping: Align tick_sched_timer() with the HZ tick Sebastian Andrzej Siewior
2023-06-13 22:59           ` [PATCH] timekeeping: Align tick_sched_timer() with the HZ tick. -- regression report Mathias Krause
2023-06-15  9:03             ` Richard W.M. Jones
2023-06-15 11:40               ` Mathias Krause
2023-06-15  9:22             ` Sebastian Andrzej Siewior
2023-06-16 18:53             ` [tip: timers/urgent] tick/common: Align tick period during sched_timer setup tip-bot2 for Thomas Gleixner
2023-04-18 13:14 ` [tip: timers/core] tick/common: Align tick period with the HZ tick tip-bot2 for Sebastian Andrzej Siewior

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=87jzypq6gq.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=peterz@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.