From: Hui Su <sh_def@163.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Hui Su <sh_def@163.com>,
mingo@redhat.com, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
vschneid@redhat.com, kprateek.nayak@amd.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/idle: Make forced polling state race-safe
Date: Sat, 17 Oct 2026 12:35:00 +0900 [thread overview]
Message-ID: <20261017123500.76882ea23304d57d9a3524ca@163.com> (raw)
In-Reply-To: <20261016090143.GR2009045@noisy.programming.kicks-ass.net>
> This is about cpu_idle_poll_ctr(), right? Is there any actual
> concurrency on that thing? Afaict there is just init time twiddling
> there.
Yes, cpu_idle_poll_ctrl(). There is an in-tree reader/writer path during
system suspend. OMAP4 calls omap_common_suspend_init(omap4_pm_suspend),
which installs omap_pm_ops; its .begin callback, omap_pm_begin(), calls
cpu_idle_poll_ctrl(true).
platform_suspend_begin() invokes that callback from
suspend_devices_and_enter() before suspend_enter() calls
pm_sleep_disable_secondary_cpus(). A secondary CPU can therefore still
be in do_idle() and read cpu_idle_force_poll while the suspend CPU updates
it.
I haven't found an in-tree pair of concurrent cpu_idle_poll_ctrl()
writers. The two-worker stress test exercised the counter's behavior with
concurrent writers; it does not establish an in-tree caller pair.
If cpu_idle_poll_ctrl() writers are expected to be serialized, I can
rework the patch around the actual reader/writer concurrency instead.
Thanks,
Hui
prev parent reply other threads:[~2026-10-17 3:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 9:42 Hui Su
2026-10-16 9:01 ` Peter Zijlstra
2026-10-17 3:35 ` Hui Su [this message]
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=20261017123500.76882ea23304d57d9a3524ca@163.com \
--to=sh_def@163.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=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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®