All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Anand <panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH V2 dracut 2/2] watchdog: install module for active watchdog
Date: Fri, 4 Mar 2016 09:45:50 +0530	[thread overview]
Message-ID: <20160304041550.GC7467@dhcppc3.redhat.com> (raw)
In-Reply-To: <20160304031334.GA3592-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>

Hi Dave,

On 04/03/2016:11:13:34 AM, Dave Young wrote:
> Hi, Pratyush
> 
> [snip]
> > 
> > Signed-off-by: Pratyush Anand <panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> > Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> > Cc: Don Zickus <dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> > Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> > ---
> >  modules.d/04watchdog/module-setup.sh | 33 +++++++++++++++++++++++++++++++++
> >  1 file changed, 33 insertions(+)
> > 
> > diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
> > index 7ec757aec032..6232afb0d9ca 100755
> > --- a/modules.d/04watchdog/module-setup.sh
> > +++ b/modules.d/04watchdog/module-setup.sh
> > @@ -32,3 +32,36 @@ install() {
> >      inst_multiple -o wdctl
> >  }
> >  
> > +installkernel() {
> > +    cd /sys/class/watchdog
> > +    for dir in */; do
> > +	    cd $dir
> > +	    active=`[ -f state ] && cat state`
> > +	    if [ "$active" =  "active" ]; then
> > +		    # applications like kdump need to know that, which
> > +		    # watchdog modules have been added into initramfs
> > +		    echo `cat identity` >> "$initdir/tmp/active-watchdogs"
> > +		    # device/modalias will return driver of this device
> 
> Seems I do not find where the identiy being used..

Yes, as stated in comment it is being used by kdump.
https://github.com/pratyushanand/kexec-tools/commit/88c2c9c931c6d2acc68bdd0adf9ac04a93a1a864#diff-c8f5f515755d435842acf0793a131c28R345

> 
> OTOH if we use it in kdump module, we should find it in kdump module code instead
> of depending on the tmp file created by wdt module.

Unfortunately, I do not see any nice way to do it in kdump until we replicate
almost all of this code (except module installation) again in kdump. In kdump
dracut module we will have to parse each directory in sysfs again to determine
active watchdogs, and then putting all this stuff in watchdog dracut is almost
useless for kdump.

Another implementation which has occurred to me was as follows:
is_wdt_modified() of kdump can rely on "driver name" instead of "identity". For
example if watchdog module installs mei_me then is_wdt_modified() just looks for
a filename  in initrd having "mei_me" string in it. But I am not sure about it.
Same string might be present in other name as well. 

However, if we can get full path of ".ko" from module name easily, that would be
helpful.

~Pratyush

  parent reply	other threads:[~2016-03-04  4:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 12:06 [PATCH V2 dracut 0/2] Install kernel module for active watchdog Pratyush Anand
     [not found] ` <cover.1456919929.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-02 12:06   ` [PATCH V2 dracut 1/2] watchdog: Do not add hooks if systemd module is included Pratyush Anand
2016-03-02 12:06   ` [PATCH V2 dracut 2/2] watchdog: install module for active watchdog Pratyush Anand
     [not found]     ` <0d7adcfdf08f4eb753a0e65e7e65d5fe0ef22f70.1456919929.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-02 15:04       ` Dracut GitHub Import Bot
2016-03-04  3:13       ` Dave Young
     [not found]         ` <20160304031334.GA3592-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2016-03-04  4:15           ` Pratyush Anand [this message]
     [not found]             ` <20160304041550.GC7467-AB7H14ik7lQf7BdofF/totBPR1lH4CV8@public.gmane.org>
2016-03-04  4:53               ` Dave Young
2016-03-04  6:22               ` Pratyush Anand
2016-03-04  4:56       ` Dave Young
     [not found]         ` <20160304045610.GD3592-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2016-03-04  5:09           ` Pratyush Anand
     [not found]             ` <20160304050914.GD7467-AB7H14ik7lQf7BdofF/totBPR1lH4CV8@public.gmane.org>
2016-03-04  7:30               ` Dave Young
     [not found]                 ` <20160304073007.GB2909-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2016-03-04  7:44                   ` Pratyush Anand
     [not found]                     ` <20160304074422.GG7467-AB7H14ik7lQf7BdofF/totBPR1lH4CV8@public.gmane.org>
2016-03-04  8:18                       ` Dave Young
2016-03-07 13:49       ` Harald Hoyer
     [not found]         ` <56DD86D4.8040800-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-07 16:28           ` Pratyush Anand
     [not found]             ` <20160307162813.GC20953-AB7H14ik7lQf7BdofF/totBPR1lH4CV8@public.gmane.org>
2016-03-07 16:52               ` Harald Hoyer
     [not found]                 ` <56DDB1DF.7050500-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-08  2:15                   ` Pratyush Anand
2016-03-04  3:16   ` [PATCH V2 dracut 0/2] Install kernel " Dave Young
     [not found]     ` <20160304031633.GB3592-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2016-03-04  3:34       ` Pratyush Anand
     [not found]         ` <20160304033443.GB7467-AB7H14ik7lQf7BdofF/totBPR1lH4CV8@public.gmane.org>
2016-03-04  7:26           ` Dave Young

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=20160304041550.GC7467@dhcppc3.redhat.com \
    --to=panand-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.