public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Re: [PATCH v4] PM / devfreq: Synchronize device_monitor_[start/stop]
       [not found] <CGME20231206105023epcas1p443ebecc35010d2577b86c3fa23e24e45@epcms1p6>
@ 2023-12-12  0:27 ` MyungJoo Ham
  0 siblings, 0 replies; only message in thread
From: MyungJoo Ham @ 2023-12-12  0:27 UTC (permalink / raw)
  To: Mukesh Ojha, Chanwoo Choi
  Cc: Kyungmin Park, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, huangzaiyang@oppo.com, CPGS

On 11/25/2023 2:41 AM, Mukesh Ojha wrote:
> There is a chance if a frequent switch of the governor
> done in a loop result in timer list corruption where
> timer cancel being done from two place one from
> cancel_delayed_work_sync() and followed by expire_timers()
> can be seen from the traces[1].
>
> while true
> do
>          echo "simple_ondemand" > /sys/class/devfreq/1d84000.ufshc/governor
>          echo "performance" > /sys/class/devfreq/1d84000.ufshc/governor
> done
>
> It looks to be issue with devfreq driver where
> device_monitor_[start/stop] need to synchronized so that
> delayed work should get corrupted while it is either
> being queued or running or being cancelled.
>
> Let's use polling flag and devfreq lock to synchronize the
> queueing the timer instance twice and work data being
> corrupted.

Would you please identify the resources to be protected by this lock
and specify them in the devfreq->lock declaration?
(it seems the list of protected resources is growing, and
we need to track them.)

Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-12  1:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20231206105023epcas1p443ebecc35010d2577b86c3fa23e24e45@epcms1p6>
2023-12-12  0:27 ` Re: [PATCH v4] PM / devfreq: Synchronize device_monitor_[start/stop] MyungJoo Ham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox