From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 DAF1A2DCBE6 for ; Fri, 23 Jan 2026 21:04:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769202289; cv=none; b=X90g25cFCYIh3FNVdennnshiuwCWWk5YpF1EOJjK7R6BJihYYV0OZ6dP/7KXnlLdd/CTEYZfvha6i1qZkK1qx172kxx3zofKIKG8062xSCmRwwSySCqWbVSe4u/EJXkmYPlCZuNKszRDK5bq/vps5vPjPiAsQ32NxSyPQ5pv+U0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769202289; c=relaxed/simple; bh=h9iHV/WcJ2flceabCTacQITfc4fdXOaU1If+ba6/CLQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZvoeZFXMrIRMYhLQ22bGpsjN8JWGyPN8IOyghidalT+gGxqKO/0S9ZdMz4rH7/XaSAYZze49We8yOK/8IV2baFb5IJ/RHRYjm8YCe+tiNRWGvqiE5imx76nUYgb7IbcpxJseeMWKUwHl46CLaYbc7Oz0z3qHRXBKCwGTPhwN2Is= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=SbnjI+Md; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="SbnjI+Md" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=53t94j2JoP3P7NjXGdB57MN2Xt0RRokaHJX/eaJmLDM=; b=SbnjI+MdnHHEx0nz/fIiPuSoji Ngi+qa/s2fCeKWlVPRvGDpeTWpsZGNYRDnxCc+i/dK8eTb7+hC19X0GdE8D5jXV70WbIe1SUU5I65 PxCu6659qlSzhG2+U6K/lEyYN9yx8+en6CeuzMtGXEPSUMt10KXh3ai81TXOA23/uOLEj2HuKnP7v Yqc/cTDloFsmph9Lq6KrKWCcEBwSqwwbg7sYOSsF9XFA7OvRaU2vRktmLkuiE40iIjAJjwthOcsKD MyMzm9xxPGH9hF+J6FC1/jSXV3Sseeye04lwBZurA97Z47tE+WNN2dNQTzMvnDwbyK4+3tyRnRxF7 iDiE0vIg==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vjOKZ-000000031UX-3LYI; Fri, 23 Jan 2026 21:04:36 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 12D4E3007E1; Fri, 23 Jan 2026 22:04:34 +0100 (CET) Date: Fri, 23 Jan 2026 22:04:33 +0100 From: Peter Zijlstra To: Steven Rostedt Cc: tglx@linutronix.de, arnd@arndb.de, anna-maria@linutronix.de, frederic@kernel.org, luto@kernel.org, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, linux-kernel@vger.kernel.org, oliver.sang@intel.com Subject: Re: [PATCH v2 5/6] entry,hrtimer: Push reprogramming timers into the interrupt return path Message-ID: <20260123210433.GA3268448@noisy.programming.kicks-ass.net> References: <20260121162010.647043073@infradead.org> <20260121162508.011240183@infradead.org> <20260123150843.3f68d4cc@gandalf.local.home> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260123150843.3f68d4cc@gandalf.local.home> On Fri, Jan 23, 2026 at 03:08:43PM -0500, Steven Rostedt wrote: > On Wed, 21 Jan 2026 17:20:15 +0100 > Peter Zijlstra wrote: > > > +#ifdef TIF_HRTIMER_REARM > > +void _hrtimer_rearm(void) > > +{ > > + struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases); > > + ktime_t now, expires_next; > > + > > + lockdep_assert_irqs_disabled(); > > + > > + scoped_guard (raw_spinlock, &cpu_base->lock) { > > + now = hrtimer_update_base(cpu_base); > > + expires_next = hrtimer_update_next_event(cpu_base); > > + __hrtimer_rearm(cpu_base, now, expires_next); > > + clear_thread_flag(TIF_HRTIMER_REARM); > > + } > > +} > > I'm curious to why you decided to use scoped_guard() here and not just > guard() and not add the extra indentation? The function is small enough > where everything is expected to be protected by the spinlock. Yeah, I'm not entirely sure... its been over 6 months since I wrote this code :-/