On Tuesday 02 May 2017 05:03 PM, Xunlei Pang wrote:
> On Tuesday 02 May 2017 02:22 PM, Xunlei Pang wrote:
>> Use the logic of dracut 04watchdog/module-setup.sh to check,
>> then we only need to compare the content of 00-watchdog.conf,
>> so we can save one operation of lsinitrd.
>>
>> Signed-off-by: Xunlei Pang <xlpang(a)redhat.com>
>> ---
>> kdumpctl | 66 ++++++++++++++++++++++++++++++++++++++++++----------------------
>> 1 file changed, 44 insertions(+), 22 deletions(-)
> Since we already have methodology to cache requisite initrd information now, so we
can avoid copying whole logic from dracut now.
> In the dracut code, we needed to traverse all the watchdog and find list of all
active watchdogs modules, while in kdump we can exit as early as a mismatch is found. Yes,
it would have been slower with lsinitrd, but now after lsinitrd gone, probably existing
logic would be simpler.
>
> We are adding 44 lines and deleting 22 lines. So, IMHO, If that does not help in
improving any performance gain then probably we can be happy with minimal change(to read
from cached lsinitrd) in existing code.
One major reason is that I didn't find a neat way to collect previous watchdog kernel
module names(see "lsinitrd $TARGET_INITRD | grep $wdtdrv &> /dev/null").
Do you have any good idea?
I think this ["lsinitrd $TARGET_INITRD | grep $wdtdrv &> /dev/null"] was
unnecessarily complex even earlier. Following would have lighter, no?
"lsinitrd -f etc/cmdline.d/00-watchdog.conf $TARGET_INITRD | grep $wdtdrv &>
/dev/null"
We already cache 00-watchdog.conf now, so that should work.
~Pratyush