From: Thomas Gleixner <tglx@linutronix.de>
To: Koichiro Den <koichiro.den@canonical.com>, linux-kernel@vger.kernel.org
Cc: anna-maria@linutronix.de, frederic@kernel.org, peterz@infradead.org
Subject: Re: [PATCH] hrtimer: reset .hres_active and .online at appropriate points
Date: Thu, 16 Jan 2025 10:08:06 +0100 [thread overview]
Message-ID: <87bjw7azyh.ffs@tglx> (raw)
In-Reply-To: <20241220134421.3809834-1-koichiro.den@canonical.com>
On Fri, Dec 20 2024 at 22:44, Koichiro Den wrote:
> int hrtimers_prepare_cpu(unsigned int cpu);
> #ifdef CONFIG_HOTPLUG_CPU
> +int hrtimers_cpu_starting(unsigned int cpu);
This does not compile for CONFIG_HOTPLUG_CPU=n
> int hrtimers_cpu_dying(unsigned int cpu);
> #else
> #define hrtimers_cpu_dying NULL
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index 85fd7ac4561e..34f1a09349fc 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -2180,7 +2180,7 @@ static struct cpuhp_step cpuhp_hp_states[] = {
> },
> [CPUHP_AP_HRTIMERS_DYING] = {
> .name = "hrtimers:dying",
> - .startup.single = NULL,
> + .startup.single = hrtimers_cpu_starting,
> .teardown.single = hrtimers_cpu_dying,
> },
> [CPUHP_AP_TICK_DYING] = {
> diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
> index 80fe3749d2db..98f23c9341f5 100644
> --- a/kernel/time/hrtimer.c
> +++ b/kernel/time/hrtimer.c
> @@ -2246,6 +2246,14 @@ static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base,
> }
> }
>
> +int hrtimers_cpu_starting(unsigned int cpu)
> +{
> + struct hrtimer_cpu_base *cpu_base = &per_cpu(hrtimer_bases, cpu);
this_cpu_ptr()
> + cpu_base->online = 1;
With that setting cpu_base->online in the prepare_cpu() callback
does not make any sense.
I'll fix it up for you this time.
Thanks,
tglx
next prev parent reply other threads:[~2025-01-16 9:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 13:44 [PATCH] hrtimer: reset .hres_active and .online at appropriate points Koichiro Den
2025-01-16 9:08 ` Thomas Gleixner [this message]
2025-01-16 9:16 ` Thomas Gleixner
2025-01-16 9:24 ` Thomas Gleixner
2025-01-18 7:37 ` Koichiro Den
2025-01-16 9:50 ` [tip: timers/urgent] hrtimers: Handle CPU state correctly on hotplug tip-bot2 for Koichiro Den
2025-01-16 10:56 ` Borislav Petkov
2025-01-16 12:36 ` tip-bot2 for Koichiro Den
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=87bjw7azyh.ffs@tglx \
--to=tglx@linutronix.de \
--cc=anna-maria@linutronix.de \
--cc=frederic@kernel.org \
--cc=koichiro.den@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox