From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Wangyang Guo <wangyang.guo@intel.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
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>
Cc: <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 v5] sched/clock: Avoid false sharing for sched_clock_irqtime
Date: Tue, 27 Jan 2026 09:08:32 +0530 [thread overview]
Message-ID: <95da1e97-bcfb-4a47-affc-fcec6e729d5b@amd.com> (raw)
In-Reply-To: <20260127031602.1907377-1-wangyang.guo@intel.com>
Hello Wangyang,
On 1/27/2026 8:46 AM, Wangyang Guo wrote:
> @@ -238,6 +239,8 @@ static int __init sched_clock_init_late(void)
>
> if (__sched_clock_stable_early)
> __set_sched_clock_stable();
> + else
> + disable_sched_clock_irqtime(); /* disable if clock unstable. */
nit. I think we should check for irqtime_enabled() before since
static_key_disable() would grab the cpus_read_lock() unnecessarily even
if irqtime wasn't enabled - possible with PA-RISC where a slow processor
registers the generic sched clock not eabling irqtime and then marks the
sched_clock unstable on SMP which would hit this without having irqtime
enabled.
Same is case with "tsc=noirqtime" and then tsc turns unstable at early
boot.
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2026-01-27 3:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 3:16 [PATCH v5] sched/clock: Avoid false sharing for sched_clock_irqtime Wangyang Guo
2026-01-27 3:38 ` K Prateek Nayak [this message]
2026-01-27 4:48 ` Guo, Wangyang
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=95da1e97-bcfb-4a47-affc-fcec6e729d5b@amd.com \
--to=kprateek.nayak@amd.com \
--cc=benjamin.lei@intel.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--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