[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKfTPtCHEhFaLSH2+Q6TSKpTDzGuJo07dRMw8_rTc7zZmYFjww@mail.gmail.com>
Date: Tue, 13 Jan 2026 12:00:09 +0100
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Wangyang Guo <wangyang.guo@...el.com>, K Prateek Nayak <kprateek.nayak@....com>,
Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>, Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>, linux-kernel@...r.kernel.org,
Shrikanth Hegde <sshegde@...ux.ibm.com>, Benjamin Lei <benjamin.lei@...el.com>,
Tim Chen <tim.c.chen@...ux.intel.com>, Tianyou Li <tianyou.li@...el.com>
Subject: Re: [PATCH v2] sched/clock: Avoid false sharing for sched_clock_irqtime
On Tue, 13 Jan 2026 at 11:36, Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Tue, Jan 13, 2026 at 11:14:54AM +0100, Vincent Guittot wrote:
> > On Tue, 13 Jan 2026 at 11:08, Peter Zijlstra <peterz@...radead.org> 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/
>
> Right, but if you note, that very same path has
> clear_sched_clock_stable(), and that is a static_key too.
>
> It's just that that punts by pushing it into a workqueue. So why not
> lift that workqueue and do both keys or something?
fair enough
Powered by blists - more mailing lists