From: Thomas Gleixner <tglx@kernel.org>
To: Teddy Astie <teddy.astie@vates.tech>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
regressions@lists.linux.dev
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
Olivier Lambert <olivier.lambert@vates.tech>
Subject: Re: [REGRESSION][BISECTED] Long boot time with Xen HVM guests during PV spinlock initialization
Date: Tue, 09 Jun 2026 17:14:45 +0200 [thread overview]
Message-ID: <87y0gn3fve.ffs@fw13> (raw)
In-Reply-To: <1780997262.8631fc262581453bbf619ec5b2062170.19eabb58e51000701b@vates.tech>
On Tue, Jun 09 2026 at 11:27, Teddy Astie wrote:
> Le 08/06/2026 à 17:15, Thomas Gleixner a écrit :
>> struct clocksource * __init __weak clocksource_default_clock(void)
>> {
>> + clocksource_register(&clocksource_jiffies);
>> return &clocksource_jiffies;
>> }
>>
>>
>>
>
> Hmm, there's a case where clocksource_mutex gets taken twice (both in
> __clocksource_register_scale() (through clocksource_register()) and
> clocksource_done_booting()).
Bah.
> What about making clocksource_jiffies gain ->enable() to setup what ever
> needs to be (like calling __clocksource_update_freq_scale()) ?
Doesn't work either.
Updated version below. It's not pretty, but it should cure your
problem. If that's confirmed I think about a less ugly solution.
Thanks,
tglx
---
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -60,15 +60,14 @@ EXPORT_SYMBOL(get_jiffies_64);
EXPORT_SYMBOL(jiffies);
-static int __init init_jiffies_clocksource(void)
-{
- return __clocksource_register(&clocksource_jiffies);
-}
-
-core_initcall(init_jiffies_clocksource);
+static bool cs_jiffies_registered __initdata;
struct clocksource * __init __weak clocksource_default_clock(void)
{
+ if (!cs_jiffies_registered) {
+ __clocksource_register(&clocksource_jiffies);
+ cs_jiffies_registered = true;
+ }
return &clocksource_jiffies;
}
prev parent reply other threads:[~2026-06-09 15:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 10:29 [REGRESSION][BISECTED] Long boot time with Xen HVM guests during PV spinlock initialization Teddy Astie
2026-06-08 10:57 ` Juergen Gross
2026-06-08 15:13 ` Thomas Gleixner
2026-06-08 21:29 ` Thomas Gleixner
2026-06-09 9:27 ` Teddy Astie
2026-06-09 15:14 ` Thomas Gleixner [this message]
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=87y0gn3fve.ffs@fw13 \
--to=tglx@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olivier.lambert@vates.tech \
--cc=regressions@lists.linux.dev \
--cc=teddy.astie@vates.tech \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox