From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E883326AF6 for ; Thu, 16 Jan 2025 09:08:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737018490; cv=none; b=JH+fohCqEf37sbjUZFxWwvS2hOMY62tabHEjiX6NquCFlAPE+0Sb2/pBhL1whykw33E4avfRj34DfUkpKULqJunItLByworgdBgwc6dIjx0r5nUE2jhic1PPkX1aEDQnTeQ4cnors4AXr8KJ9ozdHK+CKV6l5czkOzzuSNXMddA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737018490; c=relaxed/simple; bh=iOxEAvbfSdJCcbeH9aFoVYHhPOYEIYHQ1kUx5W3vJLQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Yg5ggkaxtIVdJfsDY2Bh5XZL7P+1qcJunxvqeRs5tDWNNUFZ6tM1qCRHjA8ZN5gS9BxF9D55H5hNPaglldhhd0Dg2g/XqvR+4b+V3b2n+uSSWJlyM2Urxe7AW7MesmZw42YcIOLTw+uDGeBwZx+wnpptscUMMpOZm79pJdBSs+s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=FSpTh5tj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=gLqVnLtt; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="FSpTh5tj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gLqVnLtt" From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1737018486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wB+MhxjTFFXlYHlrIODtvi9wbPlFlVGW0wDlxA3yf4A=; b=FSpTh5tjWgCPJIeHXnPeG3Tqc+wiTI+TOaXhOJ3iaBIozyYgCwn4ysAH6Jl8ehHY+lXp3U nDkLHmjIYlXeJsSQ2ORxeuuzmGXluBqRzbrUk/BDtKj2CuEx8EQN0V7KeJNxTxXBWiL12v i5wtm3NDtbWASF8n4DmOU8CitU0pQlDTHlGzd6/8pbkTWCEK8DAPIz5Df3Vd7sPulBHhsS Nwd8BM9eZnNjBGJ6JbWsHewfmU9otFvjZ7kwz7TWje0B1JwwBJK4efBXswKyynXWSCAZ6T SGAcF6b6ObNYq/4UvV/KoRui/uUmsPYvBngjwYIAewk2DgWE/FWQ305yq6s03A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1737018486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wB+MhxjTFFXlYHlrIODtvi9wbPlFlVGW0wDlxA3yf4A=; b=gLqVnLttaBvDohWUx8CxsAOdszwv1dRfU6IEezvVzw28eb71foQ/rMGq3/AKnuvxlI+KXv Cg7PI2BAsqvU3JBg== To: Koichiro Den , 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 In-Reply-To: <20241220134421.3809834-1-koichiro.den@canonical.com> References: <20241220134421.3809834-1-koichiro.den@canonical.com> Date: Thu, 16 Jan 2025 10:08:06 +0100 Message-ID: <87bjw7azyh.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain 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