All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Cross <ccross@android.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Zoran Markovic <zoran.markovic@linaro.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	Android Kernel Team <kernel-team@android.com>,
	Todd Poynor <toddpoynor@google.com>, San Mehat <san@google.com>,
	Benoit Goby <benoit@android.com>,
	John Stultz <john.stultz@linaro.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Len Brown <len.brown@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [RFC PATCHv2 2/2] PM: compile-time configuration of device suspend/resume watchdogs.
Date: Sat, 11 May 2013 15:21:48 -0700	[thread overview]
Message-ID: <CAMbhsRTcB6U5ctxWUy2ODOCGaYd_NdYZvWyxCOqcHiZPKGAv5w@mail.gmail.com> (raw)
In-Reply-To: <20130511092807.GB10045@amd.pavel.ucw.cz>

On Sat, May 11, 2013 at 2:28 AM, Pavel Machek <pavel@ucw.cz> wrote:
> Hi!
>
>> Power management debug option to configure device suspend/resume watchdogs.
>> Available options are:
>>   1. Enable/disable the feature.
>>   2. Select triggered watchdog action between:
>>         - system panic (default)
>>         - dump stacktrace
>>         - log event
>>   3. Select timeout value for the watchdog(s).
>
> People disliked the previous behaviour, so you add 10 config
> options... with different behaviours. Also 1 second timeout is not
> acceptable for endusers (will break the system), so it should not be
> offered. In fact, remove that option, too. People doing that kind of
> debugging can modify the sources, right?

Greg KH asked for more configurable options.  I agree this may be a
little too far (I would replace the action choice with a simple "panic
on timeout?"), but its better than it was before.  Also, a 1 second
timeout is perfectly reasonable, especially if you configure it to
dump a stack trace but not panic.  Mobile devices normally finish
suspending within a few hundred ms.

> (Maybe it would make sense to do same action regular watchdog does,
> but...)
>
> That's not the way to go. If "panic" is right behaviour, just go with
> panic.

I can see uses for both panic and stack trace.  If you have a driver
that takes too long, but eventually suspends, then a panic is
unnecessary and a stack trace that you can see in the logs is better,
especially for a short timeout.

>> @@ -402,13 +422,9 @@ static int dpm_run_callback(pm_callback_t cb, struct device *dev,
>>  static void dpm_wd_handler(unsigned long data)
>>  {
>>       struct dpm_watchdog *wd = (void *)data;
>> -     struct device *dev      = wd->dev;
>> -     struct task_struct *tsk = wd->tsk;
>> -
>> -     dev_emerg(dev, "**** DPM device timeout ****\n");
>> -     show_stack(tsk, NULL);
>>
>> -     BUG();
>> +     dev_emerg(wd->dev, "**** DPM device timeout ****\n");
>> +     dpm_wd_action(wd);
>>  }
>>
>>  /**
>
> And merge this to previous patch. Introducing the code then redoing it
> in next patch does not help review.
>
>                                                                         Pavel
>
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2013-05-11 22:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10 21:28 [RFC PATCHv2 0/2] power: device suspend/resume watchdog Zoran Markovic
2013-05-10 21:28 ` [RFC PATCHv2 1/2] drivers: power: Add watchdog timer to catch drivers which lockup during suspend/resume Zoran Markovic
2013-05-11  6:13   ` Colin Cross
2013-05-12  0:39     ` Rafael J. Wysocki
2013-05-12 19:15       ` Colin Cross
2013-05-13 11:26         ` Rafael J. Wysocki
2013-05-28 18:26           ` Zoran Markovic
2013-05-28 20:49             ` Rafael J. Wysocki
2013-05-31 21:13               ` Zoran Markovic
2013-06-05 22:17                 ` Zoran Markovic
2013-06-05 22:29                   ` Rafael J. Wysocki
2013-06-06 14:12                   ` Alan Stern
2013-06-10 21:25                     ` Colin Cross
2013-05-10 21:28 ` [RFC PATCHv2 2/2] PM: compile-time configuration of device suspend/resume watchdogs Zoran Markovic
2013-05-11  6:23   ` Colin Cross
2013-05-13 16:03     ` John Stultz
2013-05-11  9:28   ` Pavel Machek
2013-05-11 22:21     ` Colin Cross [this message]
2013-05-12  0:05       ` Pavel Machek

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=CAMbhsRTcB6U5ctxWUy2ODOCGaYd_NdYZvWyxCOqcHiZPKGAv5w@mail.gmail.com \
    --to=ccross@android.com \
    --cc=benoit@android.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@android.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=san@google.com \
    --cc=toddpoynor@google.com \
    --cc=zoran.markovic@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.