All of lore.kernel.org
 help / color / mirror / Atom feed
* Does dracut need start watchdog?
@ 2013-08-05 10:19 Baoquan He
       [not found] ` <20130805101929.GA26184-je1gSBvt1Td8jiCoVU1BWR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Baoquan He @ 2013-08-05 10:19 UTC (permalink / raw)
  To: harald-H+wXaHxf7aLQT0dZR+AlfA; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

Hi Harald,

Since some drivers do the soft kicking. That is if BIOS has enabled
watchdog, then kernel driver kicks the hardware till user space watchdog
daemon comes along. This can help sove the problem in kdump which kdump
kernel reboot before vmcore saving is finished. That problem is
triggered because watchdog started in 1st kernel and timeout because of
stopping being kicked.

I noticed in 04watchdog the watchdog.sh will start watchdog if
/dev/watchdog exists. I am just wondering if it's needed to start
watchdog by accessing /dev/watchdog. If starting watchdog is not needed,
I want to make some code change of watchdog.sh.

What's your suggestion?

Baoquan
Thanks a lot

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

* Re: Does dracut need start watchdog?
       [not found] ` <20130805101929.GA26184-je1gSBvt1Td8jiCoVU1BWR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
@ 2013-08-09  7:20   ` Harald Hoyer
       [not found]     ` <52049855.6050308-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Harald Hoyer @ 2013-08-09  7:20 UTC (permalink / raw)
  To: Baoquan He; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On 08/05/2013 12:19 PM, Baoquan He wrote:
> Hi Harald,
> 
> Since some drivers do the soft kicking. That is if BIOS has enabled
> watchdog, then kernel driver kicks the hardware till user space watchdog
> daemon comes along. This can help sove the problem in kdump which kdump
> kernel reboot before vmcore saving is finished. That problem is
> triggered because watchdog started in 1st kernel and timeout because of
> stopping being kicked.
> 
> I noticed in 04watchdog the watchdog.sh will start watchdog if
> /dev/watchdog exists. I am just wondering if it's needed to start
> watchdog by accessing /dev/watchdog. If starting watchdog is not needed,
> I want to make some code change of watchdog.sh.
> 
> What's your suggestion?
> 
> Baoquan
> Thanks a lot

Basically the 04watchdog module was used only in the testsuite. You might
consider to use the systemd watchdog feature instead.

http://0pointer.de/blog/projects/watchdog.html

or, if 0pointer is down again:

http://webcache.googleusercontent.com/search?q=cache:jYfJU_fFZy8J:0pointer.de/blog/projects/watchdog.html

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

* Re: Does dracut need start watchdog?
       [not found]     ` <52049855.6050308-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-12-10  8:21       ` Baoquan He
       [not found]         ` <52A6CF1C.50206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Baoquan He @ 2013-12-10  8:21 UTC (permalink / raw)
  To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On 08/09/2013 03:20 PM, Harald Hoyer wrote:
> On 08/05/2013 12:19 PM, Baoquan He wrote:
>> Hi Harald,
>>
>> Since some drivers do the soft kicking. That is if BIOS has enabled
>> watchdog, then kernel driver kicks the hardware till user space watchdog
>> daemon comes along. This can help sove the problem in kdump which kdump
>> kernel reboot before vmcore saving is finished. That problem is
>> triggered because watchdog started in 1st kernel and timeout because of
>> stopping being kicked.
>>
>> I noticed in 04watchdog the watchdog.sh will start watchdog if
>> /dev/watchdog exists. I am just wondering if it's needed to start
>> watchdog by accessing /dev/watchdog. If starting watchdog is not needed,
>> I want to make some code change of watchdog.sh.
>>
>> What's your suggestion?
>>
>> Baoquan
>> Thanks a lot
> 
> Basically the 04watchdog module was used only in the testsuite. You might
> consider to use the systemd watchdog feature instead.
> 
> http://0pointer.de/blog/projects/watchdog.html
> 
> or, if 0pointer is down again:
> 
> http://webcache.googleusercontent.com/search?q=cache:jYfJU_fFZy8J:0pointer.de/blog/projects/watchdog.html

Hi,

I tried your suggestion, systemd can't help.

In /etc/systemd/system.conf, there are 2 options to control watchdog,
however it need watchdog hardware to be present. That means watchdog
driver need be loaded during startup.

Baoquan
Thanks

> --
> To unsubscribe from this list: send the line "unsubscribe initramfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: Does dracut need start watchdog?
       [not found]         ` <52A6CF1C.50206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-12-10 11:43           ` Harald Hoyer
       [not found]             ` <52A6FE79.3050000-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Harald Hoyer @ 2013-12-10 11:43 UTC (permalink / raw)
  To: Baoquan He; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On 12/10/2013 09:21 AM, Baoquan He wrote:
> On 08/09/2013 03:20 PM, Harald Hoyer wrote:
>> On 08/05/2013 12:19 PM, Baoquan He wrote:
>>> Hi Harald,
>>>
>>> Since some drivers do the soft kicking. That is if BIOS has enabled
>>> watchdog, then kernel driver kicks the hardware till user space watchdog
>>> daemon comes along. This can help sove the problem in kdump which kdump
>>> kernel reboot before vmcore saving is finished. That problem is
>>> triggered because watchdog started in 1st kernel and timeout because of
>>> stopping being kicked.
>>>
>>> I noticed in 04watchdog the watchdog.sh will start watchdog if
>>> /dev/watchdog exists. I am just wondering if it's needed to start
>>> watchdog by accessing /dev/watchdog. If starting watchdog is not needed,
>>> I want to make some code change of watchdog.sh.
>>>
>>> What's your suggestion?
>>>
>>> Baoquan
>>> Thanks a lot
>>
>> Basically the 04watchdog module was used only in the testsuite. You might
>> consider to use the systemd watchdog feature instead.
>>
>> http://0pointer.de/blog/projects/watchdog.html
>>
>> or, if 0pointer is down again:
>>
>> http://webcache.googleusercontent.com/search?q=cache:jYfJU_fFZy8J:0pointer.de/blog/projects/watchdog.html
> 
> Hi,
> 
> I tried your suggestion, systemd can't help.
> 
> In /etc/systemd/system.conf, there are 2 options to control watchdog,
> however it need watchdog hardware to be present. That means watchdog
> driver need be loaded during startup.
> 
> Baoquan
> Thanks

Why can't systemd help?

dracut also uses the hardware watchdog. There is even a software watchdog device
driver (softdog).

Just load the module and systemd should start to make use of "/dev/watchdog".
With udevd in the initramfs, module loading should happen automatically, you
just have to add the watchdog modules to the initramfs.

$ echo; echo -n "instmods"; modinfo char-major-10-130 | while read a b; do [[ $a
== filename: ]] && (b=${b##*/}; echo -n " ${b%.ko}");done;echo

instmods pcwd_pci wdt_pci pcwd_usb alim1535_wdt alim7101_wdt sp5100_tco
sbc_fitpc2_wdt ib700wdt ibmasr i6300esb ie6xx_wdt iTCO_wdt it8712f_wdt it87_wdt
hpwdt nv_tco sch311x_wdt w83627hf_wdt w83697hf_wdt w83697ug_wdt w83877f_wdt
w83977f_wdt machzwd xen_wdt softdog

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

* Re: Does dracut need start watchdog?
       [not found]             ` <52A6FE79.3050000-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-12-11  7:58               ` Baoquan He
       [not found]                 ` <20131211075800.GD8495-je1gSBvt1TeLcxizHhUEZR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Baoquan He @ 2013-12-11  7:58 UTC (permalink / raw)
  To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On 12/10/13 at 12:43pm, Harald Hoyer wrote:
> On 12/10/2013 09:21 AM, Baoquan He wrote:
> > On 08/09/2013 03:20 PM, Harald Hoyer wrote:
> >> On 08/05/2013 12:19 PM, Baoquan He wrote:
> >>> Hi Harald,
> >>>
> >>> Since some drivers do the soft kicking. That is if BIOS has enabled
> >>> watchdog, then kernel driver kicks the hardware till user space watchdog
> >>> daemon comes along. This can help sove the problem in kdump which kdump
> >>> kernel reboot before vmcore saving is finished. That problem is
> >>> triggered because watchdog started in 1st kernel and timeout because of
> >>> stopping being kicked.
> >>>
> >>> I noticed in 04watchdog the watchdog.sh will start watchdog if
> >>> /dev/watchdog exists. I am just wondering if it's needed to start
> >>> watchdog by accessing /dev/watchdog. If starting watchdog is not needed,
> >>> I want to make some code change of watchdog.sh.
> >>>
> >>> What's your suggestion?
> >>>
> >>> Baoquan
> >>> Thanks a lot
> >>
> >> Basically the 04watchdog module was used only in the testsuite. You might
> >> consider to use the systemd watchdog feature instead.
> >>
> >> http://0pointer.de/blog/projects/watchdog.html
> >>
> >> or, if 0pointer is down again:
> >>
> >> http://webcache.googleusercontent.com/search?q=cache:jYfJU_fFZy8J:0pointer.de/blog/projects/watchdog.html
> > 
> > Hi,
> > 
> > I tried your suggestion, systemd can't help.
> > 
> > In /etc/systemd/system.conf, there are 2 options to control watchdog,
> > however it need watchdog hardware to be present. That means watchdog
> > driver need be loaded during startup.
> > 
> > Baoquan
> > Thanks
> 
> Why can't systemd help?
> 
> dracut also uses the hardware watchdog. There is even a software watchdog device
> driver (softdog).

Hi Harald,

Before we encoutered a NMI watchdog problem, that hardware is iTCO_wdt
residing in lpc_ich mtd device. Then Don (dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org) found the
iTCO_wdt driver has code that tells it to turn off the watchdog until
userspace turns it on. So for kdump, the device will get turned off
(which is what we want).

Not all devices may behave this way, but iTCO_wdt should cover the
majority of the problems we are seeing.

Now when the watchdog ko is added into kernel, with the help of udevd,
module loading happens automatically, that's great. So the thing is
where to put the code that add watchdog ko into initramfs, 04watchdog
seems like the suitable place.

Baoquan
Thanks

> 
> Just load the module and systemd should start to make use of "/dev/watchdog".
> With udevd in the initramfs, module loading should happen automatically, you
> just have to add the watchdog modules to the initramfs.
> 
> $ echo; echo -n "instmods"; modinfo char-major-10-130 | while read a b; do [[ $a
> == filename: ]] && (b=${b##*/}; echo -n " ${b%.ko}");done;echo
> 
> instmods pcwd_pci wdt_pci pcwd_usb alim1535_wdt alim7101_wdt sp5100_tco
> sbc_fitpc2_wdt ib700wdt ibmasr i6300esb ie6xx_wdt iTCO_wdt it8712f_wdt it87_wdt
> hpwdt nv_tco sch311x_wdt w83627hf_wdt w83697hf_wdt w83697ug_wdt w83877f_wdt
> w83977f_wdt machzwd xen_wdt softdog
> 

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

* Re: Does dracut need start watchdog?
       [not found]                 ` <20131211075800.GD8495-je1gSBvt1TeLcxizHhUEZR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
@ 2013-12-16  2:53                   ` Baoquan He
  0 siblings, 0 replies; 6+ messages in thread
From: Baoquan He @ 2013-12-16  2:53 UTC (permalink / raw)
  To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On 12/11/13 at 03:58pm, Baoquan He wrote:

> > Why can't systemd help?
> > 
> > dracut also uses the hardware watchdog. There is even a software watchdog device
> > driver (softdog).
> 
> Hi Harald,
> 
> Before we encoutered a NMI watchdog problem, that hardware is iTCO_wdt
> residing in lpc_ich mtd device. Then Don (dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org) found the
> iTCO_wdt driver has code that tells it to turn off the watchdog until
> userspace turns it on. So for kdump, the device will get turned off
> (which is what we want).
> 
> Not all devices may behave this way, but iTCO_wdt should cover the
> majority of the problems we are seeing.
> 
> Now when the watchdog ko is added into kernel, with the help of udevd,
> module loading happens automatically, that's great. So the thing is
> where to put the code that add watchdog ko into initramfs, 04watchdog
> seems like the suitable place.
> 
> Baoquan
> Thanks

Hi Harald,

Do you think it's OK to put watchdog driver module adding into
04watchdog? If it's fine to you, I can post a patch. 

Baoquan
Thanks

> 
> > 
> > Just load the module and systemd should start to make use of "/dev/watchdog".
> > With udevd in the initramfs, module loading should happen automatically, you
> > just have to add the watchdog modules to the initramfs.
> > 
> > $ echo; echo -n "instmods"; modinfo char-major-10-130 | while read a b; do [[ $a
> > == filename: ]] && (b=${b##*/}; echo -n " ${b%.ko}");done;echo
> > 
> > instmods pcwd_pci wdt_pci pcwd_usb alim1535_wdt alim7101_wdt sp5100_tco
> > sbc_fitpc2_wdt ib700wdt ibmasr i6300esb ie6xx_wdt iTCO_wdt it8712f_wdt it87_wdt
> > hpwdt nv_tco sch311x_wdt w83627hf_wdt w83697hf_wdt w83697ug_wdt w83877f_wdt
> > w83977f_wdt machzwd xen_wdt softdog
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe initramfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2013-12-16  2:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05 10:19 Does dracut need start watchdog? Baoquan He
     [not found] ` <20130805101929.GA26184-je1gSBvt1Td8jiCoVU1BWR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-08-09  7:20   ` Harald Hoyer
     [not found]     ` <52049855.6050308-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-10  8:21       ` Baoquan He
     [not found]         ` <52A6CF1C.50206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-10 11:43           ` Harald Hoyer
     [not found]             ` <52A6FE79.3050000-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-11  7:58               ` Baoquan He
     [not found]                 ` <20131211075800.GD8495-je1gSBvt1TeLcxizHhUEZR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-12-16  2:53                   ` Baoquan He

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.