public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: Mukesh Ojha <quic_mojha@quicinc.com>,
	Chanwoo Choi <cw00.choi@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"huangzaiyang@oppo.com" <huangzaiyang@oppo.com>,
	CPGS <cpgs@samsung.com>
Subject: RE: Re: [PATCH v4] PM / devfreq: Synchronize device_monitor_[start/stop]
Date: Tue, 12 Dec 2023 09:27:02 +0900	[thread overview]
Message-ID: <1296674576.21702343402595.JavaMail.epsvc@epcpadp3> (raw)
In-Reply-To: CGME20231206105023epcas1p443ebecc35010d2577b86c3fa23e24e45@epcms1p6

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>

           reply	other threads:[~2023-12-12  1:10 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CGME20231206105023epcas1p443ebecc35010d2577b86c3fa23e24e45@epcms1p6>]

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=1296674576.21702343402595.JavaMail.epsvc@epcpadp3 \
    --to=myungjoo.ham@samsung.com \
    --cc=cpgs@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=huangzaiyang@oppo.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=quic_mojha@quicinc.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