[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMbhsRSdk-z-67BEEd=zbWLR6=WXjpCk1uJky2ZEONS7FLcmGw@mail.gmail.com>
Date: Thu, 2 May 2013 11:25:12 -0700
From: Colin Cross <ccross@...roid.com>
To: Pavel Machek <pavel@....cz>
Cc: Zoran Markovic <zoran.markovic@...aro.org>,
lkml <linux-kernel@...r.kernel.org>,
Linux PM list <linux-pm@...r.kernel.org>,
Benoit Goby <benoit@...roid.com>,
Android Kernel Team <kernel-team@...roid.com>,
Todd Poynor <toddpoynor@...gle.com>,
San Mehat <san@...gle.com>,
John Stultz <john.stultz@...aro.org>,
"Rafael J. Wysocki" <rjw@...k.pl>, Len Brown <len.brown@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [RFC PATCH] drivers: power: Add watchdog timer to catch drivers
which lockup during suspend.
On Thu, May 2, 2013 at 5:30 AM, Pavel Machek <pavel@....cz> wrote:
> Hi!
>
>> >> > do BUG which
>> >> > dumps stack of current task
>> >> > kills current task
>> >> >
>> >> > Current task may very well be idle task; in such case you kill the
>> >> > machine. Sounds like you should be doing something else, like kill -9
>> >> > instead of BUG()?
>> >>
>> >> Not much else you can do, you are stuck part way into suspend with a
>> >> driver's suspend callback half executed. All userspace tasks are
>> >> frozen, and the suspend task is blocked indefinitely.
>> >
>> > Yes, there's better option. Attempt killing the [a]suspend task,
>> > instead of killing the current task.
>>
>> That will leave you in a completely undefined state. If you just kill
>> the task, you are likely to kill the synchronous suspend task, which
>> is the task that would resume your drivers and unfreeze tasks. That
>> will leave you with no userspace tasks running, and much of your
>> hardware suspended. How is that a useful result? If you somehow
>
> So instead you kill random task? (BUG() from timer kills pretty much
> random task, right?)
>
> If you want to do panic(), do panic().
At least on ARM a BUG() in an interrupt or softirq always results in a
panic, but this can be switched to directly call panic.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists