[android-kernel] Enabling watchdog

1,371 views
Skip to first unread message

Alok

unread,
May 3, 2010, 4:26:01 AM5/3/10
to Android Linux Kernel Development
Hi Group
I have to enable linux kernel watchdog driver on Android eclair. I
read that from user space a watchdog daemon has to keep writing on /
dev/watchdog
at scheduled time to avoid the system reset. Does Android
framework supports this ?

More query:
Android already has watchdog (Watchdog.java) taking care of System
Server process, so is it beneficial to enable linux kernel watchdog
driver also ? Has anybody done it on Android platform ?


Thanks
Alok


PS: I posted this query on Android-Porting list also, but did not get
response.

--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Greg KH

unread,
May 3, 2010, 1:27:14 PM5/3/10
to android...@googlegroups.com
On Mon, May 3, 2010 at 1:26 AM, Alok <moondr...@gmail.com> wrote:
> Hi Group
> I have to enable linux kernel watchdog driver on Android eclair.

Why is this a requirement for you to do, if you do not even know
if it is necessary?

> I read that from user space a watchdog daemon has to keep writing on /
> dev/watchdog at scheduled time to avoid the system reset.

It depends on the watchdog driver that you use. Which one are you
using?

> Does Android framework supports this ?

Sure, if you write it :)

> More query:
> Android already has watchdog (Watchdog.java) taking care of System
> Server process, so is it beneficial to enable linux kernel watchdog
> driver also ?

How about the other question, why do you feel that enabling a kernel
watchdog would help anything out?

confused,

greg k-h

Sudeep K N

unread,
May 4, 2010, 12:55:19 PM5/4/10
to Android Linux Kernel Development

> Why is this a requirement for you to do, if you do not even know
> if it is necessary?

This is just my understanding, if more some reason the hardware timers
used for system time keeping stops, can't we use the watchdogs to
reset
the system?

Regards,
Sudeep

Greg KH

unread,
May 4, 2010, 1:18:27 PM5/4/10
to android...@googlegroups.com
On Tue, May 4, 2010 at 9:55 AM, Sudeep K N
<sudeepholl...@gmail.com> wrote:
>
>> Why is this a requirement for you to do, if you do not even know
>> if it is necessary?
>
> This is just my understanding, if more some reason the hardware timers
> used for system time keeping stops, can't we use the watchdogs to
> reset the system?

Your question does not make sense, care to rephrase it?

thanks,

greg k-h

Mike Chan

unread,
May 4, 2010, 1:37:10 PM5/4/10
to android...@googlegroups.com

On Droid we use the OMAP watchdog. I've found it useful to catch lockups in the kernel suspend / resume path for drivers.

-- Mike

Sudeep K N

unread,
May 4, 2010, 11:27:22 PM5/4/10
to Android Linux Kernel Development
Greg,

Sorry for the typo error, what I meant was if for some reason the
hardware
timers used for system time keeping stops, then we can make use of the
watchdogs to reset the system in that scenario.
As Mike mentioned it can also be used even to catch lockups and
trigger reset
(watchdog h/w can be configured to reset the core processor) or a
recovery
through a defined mechanism that can started in watchdog interrupt
handler
(watchdog h/w can be configured to generate interrupts).

On May 4, 10:18 pm, Greg KH <gre...@gmail.com> wrote:
> On Tue, May 4, 2010 at 9:55 AM, Sudeep K N
>

Alok

unread,
May 5, 2010, 2:51:13 AM5/5/10
to Android Linux Kernel Development
Hi Greg
Thanks for your response.
Android watchdog is monitoring systemserver process and if it itself
gets stuck because of some reasons then system doesnt restart. To
handle these type of scenarios, I feel hw watchdog can be useful.

Thanks
Alok.


On May 3, 10:27 pm, Greg KH <gre...@gmail.com> wrote:

Greg KH

unread,
May 5, 2010, 10:57:57 AM5/5/10
to android...@googlegroups.com
A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Tue, May 4, 2010 at 11:51 PM, Alok <moondr...@gmail.com> wrote:
> Hi Greg
> Thanks for your response.
> Android watchdog is monitoring systemserver process and if it itself
> gets stuck because of some reasons then system doesnt restart. To
> handle these type of scenarios, I feel hw watchdog can be useful.

Yes, they can be very useful, I agree with that. But you said
it was a "requirement", which differs from "being useful" :)

Anyway, it should be trivial to add it to the kernel build and
implement it to the watchdog userspace service as needed, especially
as it has already been done on some other Android systems as
previously noted.

good luck,
Reply all
Reply to author
Forward
0 new messages