Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v5 0/2] remoteproc: core: do pm relax when in
@ 2022-12-02  9:45 Maria Yu
  2022-12-02  9:45 ` [PATCH v5 1/2] remoteproc: core: do pm relax when in RPROC_OFFLINE Maria Yu
  2022-12-02  9:45 ` [PATCH v5 2/2] remoteproc: core: change to ordered workqueue for crash handler Maria Yu
  0 siblings, 2 replies; 12+ messages in thread
From: Maria Yu @ 2022-12-02  9:45 UTC (permalink / raw)
  To: mathieu.poirier
  Cc: Maria Yu, arnaud.pouliquen, linux-arm-msm, linux-remoteproc,
	quic_clew

If the remote processor is offline, no need to recover anything, and
pm_relax is needed to be called.

Only the first detected crash needed to be handled, so change
to ordered workqueue to avoid unnecessary multi active work at
the same time. This will reduce the pm_relax unnecessary concurrency.

summary from some discussion points:

pm_stay_awake() is needed to stop and reverse the suspend process that
is currently underway.

RPROC_OFFLINE state indicate there is no recovery process
is in progress and no chance to do the pm_relax.
Because when recovering from crash, rproc->lock is held and
state is RPROC_CRASHED -> RPROC_OFFLINE -> RPROC_RUNNING,
and then unlock rproc->lock.
When the state is in RPROC_OFFLINE it means separate request
of rproc_stop was done and no need to hold the wakeup source
in crash handler to recover any more.


Changelog
===
V5
---
Use goto out instead of directly call pm_relax and return. Suggested by
Mathieu.
Add new change with allocate ordered workqueue for allow only 1 active
work.

V4
---
Add pm relax when in RPROC_OFFLINE.

previous discussion here:
[1] https://lore.kernel.org/lkml/1bcd3fe8-f68d-ea7f-c0f9-68771e3421d5@quicinc.com/

Maria Yu (2):
  remoteproc: core: do pm relax when in RPROC_OFFLINE
  remoteproc: core: change to ordered workqueue for crash handler

 drivers/remoteproc/remoteproc_core.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-12-07 18:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-02  9:45 [PATCH v5 0/2] remoteproc: core: do pm relax when in Maria Yu
2022-12-02  9:45 ` [PATCH v5 1/2] remoteproc: core: do pm relax when in RPROC_OFFLINE Maria Yu
2022-12-02 17:30   ` Mathieu Poirier
2022-12-06  0:58     ` Aiqun(Maria) Yu
2022-12-02 18:09   ` Bjorn Andersson
2022-12-06  1:05     ` Aiqun(Maria) Yu
2022-12-02  9:45 ` [PATCH v5 2/2] remoteproc: core: change to ordered workqueue for crash handler Maria Yu
2022-12-02 17:34   ` Mathieu Poirier
2022-12-06  1:28     ` Aiqun(Maria) Yu
2022-12-07 18:16       ` Mathieu Poirier
2022-12-02 18:16   ` Bjorn Andersson
2022-12-06  1:42     ` Aiqun(Maria) Yu

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