Re: [PATCH v2] sched/clock: Avoid false sharing for sched_clock_irqtime
From: Vincent Guittot
Date: Tue Jan 13 2026 - 05:15:07 EST
On Tue, 13 Jan 2026 at 11:08, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Tue, Jan 13, 2026 at 03:48:07PM +0800, Wangyang Guo wrote:
> > Read-mostly sched_clock_irqtime may share the same cacheline with
> > frequently updated nohz struct. Mark it as __read_mostly to avoid
> > false sharing issue.
> >
>
> Is there a reason that thing can't be a static_key or so?
We tried that but disable_sched_clock_irqtime can be called in atomic
context with mark_tsc_unstable()
https://lore.kernel.org/all/174161357383.14745.8770394914047302959.tip-bot2@tip-bot2/