Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: zhangqiao22@huawei.com, Zhan Xusheng <zhanxusheng1024@gmail.com>
Cc: tglx@linutronix.de, jstultz@google.com, sboyd@kernel.org,
	peterz@infradead.org, mark.rutland@arm.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, zhanxusheng@xiaomi.com
Subject: Re: [QUESTION] sched/clock: Potential timestamp jump due to inter-CPU counter skew?
Date: Mon, 26 Oct 2026 09:05:00 +0000	[thread overview]
Message-ID: <86zew0ygqr.wl-maz@kernel.org> (raw)
In-Reply-To: <20261026082730.2117173-1-zhanxusheng1024@gmail.com>

On Mon, 26 Oct 2026 08:27:30 +0000,
Zhan Xusheng <zhanxusheng1024@gmail.com> wrote:
> 
> On arm64 the system counter is meant to give all PEs a common view of
> time, and keeping the copies on separate dies in step is the
> implementation's job.  The kernel has no tolerance for skew.  The counter
> errata handled in arm_arch_timer.c (Freescale A-008585, HiSilicon
> 161010101, Cortex-A73 858921, Allwinner A64) are all reads on a single
> CPU returning a wrong value, worked around by reading twice; none of them
> is skew between CPUs.

Indeed. If the implementation cannot give any two arbitrary CPUs
anywhere in the system the exact same view of the counter, then this
implementation is broken, and unsupported. No discussion.

	M.

-- 
Without deviation from the norm, progress is not possible.


  reply	other threads:[~2026-10-26  9:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26  6:53 [QUESTION] sched/clock: Potential timestamp jump due to inter-CPU counter skew? Zhang Qiao
2026-10-26  8:27 ` Zhan Xusheng
2026-10-26  9:05   ` Marc Zyngier [this message]
2026-10-26 10:23     ` Peter Zijlstra

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=86zew0ygqr.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=jstultz@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peterz@infradead.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=zhangqiao22@huawei.com \
    --cc=zhanxusheng1024@gmail.com \
    --cc=zhanxusheng@xiaomi.com \
    /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