Re: [PATCH v4 2/4] PM / QoS: add lockless read for flags

Kendall Willis <[email protected]>
Newsgroups org.kernel.vger.linux-pm,org.kernel.vger.linux-kernel
Message-ID <20260825161910.3y6avivkn6layuyi@uda0506412>
On 10:08-20260819, Kevin Hilman (TI) wrote:
> Add a lockless read for QoS flags similar to the lockless read for
> resume latency (dev_pm_qos_raw_resume_latency) which may be called
> from atomic context (e.g. genpd governors running under a raw spinlock
> or in the syscore suspend path), where taking that sleeping lock would
> be invalid on PREEMPT_RT.
> 
> dev_pm_qos_raw_flags() now reads dev->power.qos->flags.effective_flags
> with READ_ONCE() so also add corresponding WRITE_ONCE() to the two
> effective_flags writes, the same way pm_qos_set_value() already does
> for target_value/pm_qos_read_value().
> 
> Signed-off-by: Kevin Hilman (TI) <[email protected]>

Reviewed-by: Kendall Willis <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.