linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <josephjang@google.com>
To: gregkh@linuxfoundation.org, rafael@kernel.org, rjw@rjwysocki.net,
	pavel@ucw.cz, len.brown@intel.com, pmladek@suse.com,
	sergey.senozhatsky@gmail.com, rostedt@goodmis.org,
	Kees Cook <keescook@chromium.org>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
	"David S . Miller" <davem@davemloft.net>,
	Rob Herring <robh@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	jonglin@google.com, woodylin@google.com, markcheng@google.com,
	josephjang@google.com
Subject: Re: [PATCH v6] power: suspend: Move dpm_watchdog to suspend.c and enhance it
Date: Tue, 16 Mar 2021 10:12:34 +0000	[thread overview]
Message-ID: <000000000000e2a17305bda49a5e@google.com> (raw)

> Since dpm_watchdog just cover two functions __device_suspend() and
> device_resume(), we proposed to move it to core power suspend.c to extend
> its coverage and monitor more devices suspend hand issues.

> We propose to use new name suspend watchdog and new timeout handler to
> cover more sleep hang issues. The new timeout handler will dump disk
> sleep task call trace at first round timeout and trigger kernel panic
> at second round timeout.
> The default timer for each round is defined in
> CONFIG_PM_SUSPEND_WATCHDOG_TIMEOUT.

> Signed-off-by: Joseph Jang <josephjang@google.com>
> ---
> Changes since v5:
>   - Remove MAINTAINERS update since we current MAINTAINERS already cover  
> kernel/power/
>   drivers/base/power/main.c       | 69 ---------------------------
>   kernel/power/Kconfig            | 27 +++++------
>   kernel/power/Makefile           |  1 +
>   kernel/power/suspend.c          | 19 ++++++++
>   kernel/power/suspend_watchdog.c | 84 +++++++++++++++++++++++++++++++++
>   kernel/power/suspend_watchdog.h | 40 ++++++++++++++++
>   kernel/printk/printk.c          |  2 +-
>   7 files changed, 158 insertions(+), 84 deletions(-)
>   create mode 100644 kernel/power/suspend_watchdog.c
>   create mode 100644 kernel/power/suspend_watchdog.h

> @@ -916,7 +852,6 @@ static int device_resume(struct device *dev,  
> pm_message_t state, bool async)
>          if (!dpm_wait_for_superior(dev, async))
>                  goto Complete;

> +
>   /**
>    * pm_suspend_default_s2idle - Check if suspend-to-idle is the default  
> suspend.
>    *
> @@ -89,6 +92,8 @@ static void s2idle_enter(void)
>   {
>          trace_suspend_resume(TPS("machine_suspend"), PM_SUSPEND_TO_IDLE,  
> true);

> +       stop_suspend_watchdog(&suspend_wd);
> +
>          raw_spin_lock_irq(&s2idle_lock);
>          if (pm_wakeup_pending())
>                  goto out;
> @@ -114,6 +119,8 @@ static void s2idle_enter(void)
>          s2idle_state = S2IDLE_STATE_NONE;
>          raw_spin_unlock_irq(&s2idle_lock);

> +       start_suspend_watchdog(&suspend_wd);
> +
>          trace_suspend_resume(TPS("machine_suspend"), PM_SUSPEND_TO_IDLE,  
> false);
>   }

> 2.30.0.365.g02bc693789-goog

Hi Greg and Rafael,

Sorry for the interrupt ~
Since this patch is really help us to narrow down many problems at our  
platform.
May I know if you could help to take a look at PATCH#6 again ?

Thank you,
Joseph.

             reply	other threads:[~2021-03-16 10:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 10:12 josephjang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-28  9:39 [PATCH v6] power: suspend: Move dpm_watchdog to suspend.c and enhance it Joseph Jang
2021-03-23 14:08 ` Greg Kroah-Hartman

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=000000000000e2a17305bda49a5e@google.com \
    --to=josephjang@google.com \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonglin@google.com \
    --cc=keescook@chromium.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=markcheng@google.com \
    --cc=pavel@ucw.cz \
    --cc=pmladek@suse.com \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=robh@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tony.luck@intel.com \
    --cc=woodylin@google.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;
as well as URLs for NNTP newsgroup(s).