mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Wangyang Guo <wangyang.guo@intel.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	linux-kernel@vger.kernel.org,
	Shrikanth Hegde <sshegde@linux.ibm.com>,
	Benjamin Lei <benjamin.lei@intel.com>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Tianyou Li <tianyou.li@intel.com>
Subject: Re: [PATCH v2] sched/clock: Avoid false sharing for sched_clock_irqtime
Date: Tue, 13 Jan 2026 11:36:26 +0100	[thread overview]
Message-ID: <20260113103626.GB830229@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKfTPtDpdFuVo83ZbXFhTAbydq-5TxTAcf+JWeN8mK3nosJCQA@mail.gmail.com>

On Tue, Jan 13, 2026 at 11:14:54AM +0100, Vincent Guittot wrote:
> On Tue, 13 Jan 2026 at 11:08, Peter Zijlstra <peterz@infradead.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?

  reply	other threads:[~2026-01-13 10:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-13  7:48 Wangyang Guo
2026-01-13  9:01 ` Shrikanth Hegde
2026-01-13 10:07 ` Peter Zijlstra
2026-01-13 10:14   ` K Prateek Nayak
2026-01-13 10:14   ` Vincent Guittot
2026-01-13 10:36     ` Peter Zijlstra [this message]
2026-01-13 11:00       ` Vincent Guittot

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=20260113103626.GB830229@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=benjamin.lei@intel.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=sshegde@linux.ibm.com \
    --cc=tianyou.li@intel.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=wangyang.guo@intel.com \
    /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

all inboxes | Powered by JetHome®