All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Mahesh Jagannath Salgaonkar
	<mahesh-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Initramfs Dracut
	<initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Ananth Narayan <ananth-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org>,
	Steven F Best <sbest-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
	Haren Myneni <hbabu-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
	holzheu-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Subject: Re: Firmware assisted dump support in dracut
Date: Wed, 5 Jun 2013 10:55:04 -0400	[thread overview]
Message-ID: <20130605145504.GE16339@redhat.com> (raw)
In-Reply-To: <51AF40BB.5010703-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

On Wed, Jun 05, 2013 at 07:14:27PM +0530, Mahesh Jagannath Salgaonkar wrote:
> On 06/04/2013 07:51 PM, Vivek Goyal wrote:
> > On Tue, Jun 04, 2013 at 10:14:03AM -0400, Vivek Goyal wrote:
> >> On Tue, Jun 04, 2013 at 01:50:19PM +0530, Mahesh Jagannath Salgaonkar wrote:
> >>> On 05/30/2013 07:53 PM, Vivek Goyal wrote:
> >>>> On Thu, May 30, 2013 at 08:49:07AM +0200, Harald Hoyer wrote:
> >>>>
> >>>> [..]
> >>>>>> Sorry for restarting this discussion very late. I would like to know how
> >>>>>> safe is to rebuild kernel's default (boot) initramfs for an already
> >>>>>> installed kernel ?
> >>>>>>
> >>>>>> Also, Does dracut provides any of following mechanism?
> >>>>>> a) Mechanism where dracut can detect what options were used during first
> >>>>>> build for a given (exsisting) initramfs. (This mechanism may help one to
> >>>>>> regenerate similar initramfs with additional dracut modules.)
> >>>>>
> >>>>> currently dracut only stores which modules were used to generate the image in
> >>>>> usr/lib/dracut/modules.txt
> >>>>>
> >>>>> But yes, you are right. Would be nice to save all the options and have a
> >>>>> mechanism to regenerate it with those.
> >>>>>
> >>>>
> >>>> I am not sure how well it will work in the context of kdump.  kdump
> >>>> options and original options might conflict. kdump might drop some of
> >>>> its own cmdline options in initramfs which might not make any sense
> >>>> in regular boot.
> >>>>
> >>>> Kdump will specify additional mount points. IIUC, then we will try
> >>>> to bring up those targets in regular boot too and mount at user
> >>>> specified mount point. And later init services might get confused
> >>>> when respective daemon tries to bring up same targets again.
> >>>
> >>> I think we should be able differentiate between regular boot and boot
> >>> after crash by checking existence of '/proc/vmcore' file, and do the
> >>> kdump specific configs/mount if this file exists. In regular boot we can
> >>> mute the kdump code path.
> >>
> >> Also what about kernel command line? Kernel command line can be very
> >> specific to kdump environment. It is atleast in x86. I am hoping that's
> >> not the case with firmware assisted dump.
> > 
> > If first kernel and kdump kernel command line are same in fadump and
> > boot environment is same, I think it is worth exploring the option
> > of saving kdump from kdump service when system boots back. That will
> > do away with any need to tweak initramfs.
> 
> This needs larger memory to be reserved. We may need to make sure that
> kdump service is invoked at very early stage before other services kicks
> in which may start requesting for memory and run into OOM issue. If we
> can make sure that no other services are invoked when kdump service is
> saving dump then it will help to fix the size of reserved memory. The
> systemd infrastructure provides aggressive parallelization capabilities.
> I am not expert on systemd but will need to explore whether with systemd
> is this possible.

I think we can create a new service for saving dump and make some of
the systemd services dependent on start of this service. 

Can't integrate with existing kdump service as that one can start
later and can take time in regenerating initramfs and holding back other
services for that duration will not make sense.

By creating a seprate service, delay will be introduced only when there
s dump to be saved. Before this we will have bring up all networking
and storage in the system so that we can save dump to intended target.

I think same service can be used to save dump from inside initramfs
too. (As systemd is now started inside initramfs too). 

Other appraoch is dumping through initramfs and if you do things
conditionally (if dump is available), then any dracut parameter
used by kdump will have to have a conditional version too. Something
like

mount=
mount.kdump_only=

mount.kdump_only will kick in only dump is available. Also we need to
make sure that effects of all kdump_only options are undone before
root is mounted or we create nice handover mechanism to systemd. I think
there handover mechanism already between initramfs and systemd for complex
storage targets like multipathd.

I will let harald comment on what does he think of kdump_only variant
options.

Thanks
Vivek

  parent reply	other threads:[~2013-06-05 14:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28 16:12 Firmware assisted dump support in dracut Mahesh J Salgaonkar
     [not found] ` <20121128161234.GA8991-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org>
2012-11-29 10:14   ` Harald Hoyer
     [not found]     ` <50B73598.804-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-11-30 15:31       ` Vivek Goyal
2012-12-06  6:21       ` Mahesh Jagannath Salgaonkar
     [not found]         ` <50C03971.4050104-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2013-05-30  5:17           ` Mahesh Jagannath Salgaonkar
     [not found]             ` <51A6E0E4.1000502-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2013-05-30  6:49               ` Harald Hoyer
     [not found]                 ` <51A6F663.5030804-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-30 14:23                   ` Vivek Goyal
     [not found]                     ` <20130530142318.GC2864-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-06-04  8:20                       ` Mahesh Jagannath Salgaonkar
     [not found]                         ` <51ADA343.2070100-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2013-06-04 13:57                           ` Vivek Goyal
2013-06-04 14:14                           ` Vivek Goyal
     [not found]                             ` <20130604141403.GG4799-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-06-04 14:21                               ` Vivek Goyal
     [not found]                                 ` <20130604142123.GH4799-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-06-05 13:44                                   ` Mahesh Jagannath Salgaonkar
     [not found]                                     ` <51AF40BB.5010703-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2013-06-05 14:55                                       ` Vivek Goyal [this message]
     [not found]                                         ` <20130605145504.GE16339-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-06-05 15:53                                           ` Vivek Goyal
     [not found]                                             ` <20130605155316.GI16339-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-06-06  8:34                                               ` Mahesh Jagannath Salgaonkar
2013-06-04 15:19                               ` Michael Holzheu
2013-06-05  9:21                               ` Mahesh Jagannath Salgaonkar
2013-06-04  8:34                   ` Mahesh Jagannath Salgaonkar
     [not found]                     ` <51ADA6AB.5010503-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2013-06-04 18:42                       ` Andrey Borzenkov

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=20130605145504.GE16339@redhat.com \
    --to=vgoyal-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=ananth-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org \
    --cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hbabu-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    --cc=holzheu-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mahesh-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=sbest-r/Jw6+rmf7HQT0dZR+AlfA@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.