All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Fab Stz <fabstz-it@yahoo.fr>, John Stultz <jstultz@google.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Anna-Maria Behnsen <anna-maria@linutronix.de>,
	Frederic Weisbecker <frederic@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [REGRESSION] ? system is stuck in clocksource, >60s delay at boot time without tsc=unstable
Date: Wed, 15 Jan 2025 17:59:11 +0100	[thread overview]
Message-ID: <87plkoau8w.ffs@tglx> (raw)
In-Reply-To: <b9b58a9e-eb56-4acd-b854-0b5ccb8e6759@yahoo.fr>

On Sat, Jan 04 2025 at 23:02, Fab Stz wrote:
> Le 03/01/2025 à 20:02, John Stultz a écrit :
> When building the kernel from the sources from the stable repo of the 
> kernel to try a git bisect I couldn't reproduce a case where the warning 
> is before loading '/init' with the versions I mentioned as working. 
> Maybe I was just lucky as you mentioned. If the warning comes before the 
> loading of USB modules, there is no delay. If it comes after, there is a 
> delay.

This is a timing problem, which depends on kernel configuration and
run-time differences, but that's just a symptom. It explains why you are
seeing it sometimes and sometimes not. Nothing else.

> If I break/pause at the beginning of the /init script, the warning never 
> comes before. I don't really understand what is happening and where the 
> problem actually lies (kernel? systemd? udev? somewhere else?). If I add 
> a "sleep 5" as 1st command in "/init" it would take ages. So as long as 
> the warning from the clocksource is not displayed, the delays seem 
> completely wrong.

That's an interesting data point because that 'sleep 5' puts the system
into idle and probably into deep idle for the first time during boot.

> Maybe the USB drivers somehow rely on a reliable clock source for
> proper functioning.

The kernel relies on a reliable clocksource. Loading the USB driver merely
exposes the problem because it probably causes a long enough delay to
get the CPUs into a state which exposes the issue.

AFAICT, that iMac 9.1 is Core 2 Duo based and that generation of
processors definitely had issues with the TSC in deeper idle states.

> BTW, I tried the "processor.max_cstate=1" you mentioned but it didn't 
> change anything on the delay and/or warning.

That's weird, but we have no idea what kind of magic the BIOS implements
there for power management behind the kernels back. I assume that it
does because this generation of CPUs uses the ACPI processor idle driver
and that disables TSC when it detects that the system supports
C-states > 1.

# cat /sys/devices/system/cpu/cpuidle/

tells which idle driver is actually in use.

# ls /sys/devices/system/cpu/cpu0/cpuidle/

tells which states are supported by the driver

# cat /sys/devices/system/cpu/cpu0/cpuidle/state$N/name
# cat /sys/devices/system/cpu/cpu0/cpuidle/state$N/disable

tells the actual C-state name and the disabled state, but I expect that
there is nothing to see.

Can you try 'idle=halt' instead?

Thanks,

        tglx

  reply	other threads:[~2025-01-15 16:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <10cf96aa-1276-4bd4-8966-c890377030c3.ref@yahoo.fr>
2024-11-27  7:18 ` [REGRESSION] ? system is stuck in clocksource, >60s delay at boot time without tsc=unstable Fab Stz
2024-12-27 12:39   ` Fab Stz
2025-01-02 21:49     ` John Stultz
2025-01-02 21:56       ` John Stultz
2025-01-03 15:38         ` Fab Stz
2025-01-03 19:02           ` John Stultz
2025-01-04 22:02             ` Fab Stz
2025-01-15 16:59               ` Thomas Gleixner [this message]
2025-02-23 17:01                 ` Fab Stz
2025-02-24  8:13                   ` Thomas Gleixner
2025-02-25  8:11                     ` Fab Stz
2025-02-25 19:35                       ` Thomas Gleixner
2025-02-25 22:37                         ` [PATCH] intel_idle: Handle older CPUs, which stop the TSC in deeper C states, correctly Thomas Gleixner
2025-02-26 10:24                           ` Rafael J. Wysocki

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=87plkoau8w.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=anna-maria@linutronix.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=fabstz-it@yahoo.fr \
    --cc=frederic@kernel.org \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.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.