public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Dave Young <dyoung@redhat.com>
Cc: kexec@lists.infradead.org, WANG Chao <chaowang@redhat.com>,
	linn@hp.com, hpa@zytor.com, trenn@suse.de, vgoyal@redhat.com,
	ebiederm@xmission.com
Subject: Re: [PATCH v6 9/9] x86: Pass memory range via E820 for kdump
Date: Mon, 21 Apr 2014 09:01:03 +0900	[thread overview]
Message-ID: <20140421000103.GC32087@verge.net.au> (raw)
In-Reply-To: <20140417055817.GE4889@dhcp-16-126.nay.redhat.com>

On Thu, Apr 17, 2014 at 01:58:17PM +0800, Dave Young wrote:
> On 04/17/14 at 01:48pm, WANG Chao wrote:
> > On 04/17/14 at 01:29pm, Dave Young wrote:
> > > On 04/14/14 at 10:55pm, WANG Chao wrote:
> > > > command line size is restricted by kernel, sometimes memmap=exactmap has
> > > > too many memory ranges to pass to cmdline. And also memmap=exactmap and
> > > > kASLR doesn't work together.
> > > > 
> > > > A better approach, to pass the memory ranges for crash kernel to boot
> > > > into, is filling the memory ranges into E820.
> > > > 
> > > > boot_params only got 128 slots for E820 map to fit in, when the number of
> > > > memory map exceeds 128, use setup_data to pass the rest as extended E820
> > > > memory map.
> > > > 
> > > > kexec boot could also benefit from setup_data in case E820 memory map
> > > > exceeds 128.
> > > > 
> > > > Now this new approach becomes default instead of memmap=exactmap.
> > > > saved_max_pfn users can specify --pass-memmap-cmdline to use the
> > > > exactmap approach.
> > > > 
> > > > Signed-off-by: WANG Chao <chaowang@redhat.com>
> > > > Tested-by: Linn Crosetto <linn@hp.com>
> > > > Reviewed-by: Linn Crosetto <linn@hp.com>
> > > > ---
> > > >  kexec/arch/i386/crashdump-x86.c   |   6 +-
> > > >  kexec/arch/i386/x86-linux-setup.c | 149 +++++++++++++++++++++++++-------------
> > > >  kexec/arch/i386/x86-linux-setup.h |   1 +
> > > >  3 files changed, 103 insertions(+), 53 deletions(-)
> > > > 
> > > > diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
> > > > index 7b618a6..4a1491b 100644
> > > > --- a/kexec/arch/i386/crashdump-x86.c
> > > > +++ b/kexec/arch/i386/crashdump-x86.c
> > > > @@ -979,7 +979,8 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
> > > >  	dbgprintf("Created elf header segment at 0x%lx\n", elfcorehdr);
> > > >  	if (delete_memmap(memmap_p, &nr_memmap, elfcorehdr, memsz) < 0)
> > > >  		return -1;
> > > > -	cmdline_add_memmap(mod_cmdline, memmap_p);
> > > > +	if (arch_options.pass_memmap_cmdline)
> > > > +		cmdline_add_memmap(mod_cmdline, memmap_p);
> > > >  	if (!bzImage_support_efi_boot)
> > > >  		cmdline_add_efi(mod_cmdline);
> > > >  	cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);
> > > > @@ -995,7 +996,8 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
> > > >  		type = mem_range[i].type;
> > > >  		size = end - start + 1;
> > > >  		add_memmap(memmap_p, &nr_memmap, start, size, type);
> > > > -		cmdline_add_memmap_acpi(mod_cmdline, start, end);
> > > > +		if (arch_options.pass_memmap_cmdline)
> > > > +			cmdline_add_memmap_acpi(mod_cmdline, start, end);
> > > 
> > > Seems memmap_p contains the acpi ranges as well, so cmdline_add_memmap_acpi is
> > > not necessary anymore, just improve cmdline_add_memmap to add both RAM and ACPI
> > > ranges is enough.
> > 
> > I can do that. But is it what the patchset is really about ...
> > 
> > I'm not keen about doing too much cleanup in this series now since it's
> > already v6. I really want to get this in as early as possible to
> > cope with calgary iommu change in the kernel.
> > 
> > I prefer to first get this patch in if there's no problem in it and then
> > look back and think about how we can clean up the code block which have
> > been there for historical reason.
> 
> I think the cleanup is worth, but if you want to do it later I'm fine.
> So should better leave the patch 5/9 to later cleanup as well.
> 
> Thus except for 5/9, for other patches:
> Acked-by: Dave Young <dyoung@redhat.com>

This sounds fine to me.

Chao, would you care to re-post the series without 5/9 ?

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2014-04-21  0:01 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 14:55 [PATCH v6 0/9] kexec-tools, x86: E820 memmap pass for kdump WANG Chao
2014-04-14 14:55 ` [PATCH v6 1/9] x86, cleanup: add extra arguments to add_memmap() and delete_memmap() WANG Chao
2014-04-14 14:55 ` [PATCH v6 2/9] x86, cleanup: add_memmap() only do alignment check on RANGE_RAM WANG Chao
2014-04-14 14:55 ` [PATCH v6 3/9] x86, cleanup: add other types of memory range for 2nd kernel boot to memmap_p WANG Chao
2014-04-14 14:55 ` [PATCH v6 4/9] x86, cleanup: use dbgprint_mem_range for memory range debugging WANG Chao
2014-04-14 14:55 ` [PATCH v6 5/9] x86, cleanup: increase CRASH_MAX_MEMMAP_NR up to CRASH_MAX_MEMORY_RANGES WANG Chao
2014-04-14 14:55 ` [PATCH v6 6/9] x86, cleanup: Store crash memory ranges kexec_info WANG Chao
2014-04-14 14:55 ` [PATCH v6 7/9] x86, cleanup: kexec memory range .end to be inclusive WANG Chao
2014-04-14 14:55 ` [PATCH v6 8/9] x86: add --pass-memmap-cmdline option WANG Chao
2014-04-14 14:55 ` [PATCH v6 9/9] x86: Pass memory range via E820 for kdump WANG Chao
2014-04-17  5:29   ` Dave Young
2014-04-17  5:35     ` Dave Young
2014-04-17  6:17       ` WANG Chao
2014-04-17  6:32         ` Dave Young
2014-04-17  6:44           ` Dave Young
2014-04-17  6:52             ` Dave Young
2014-04-17  7:05             ` WANG Chao
2014-04-17  6:57           ` WANG Chao
2014-04-17  7:07             ` Dave Young
2014-04-17  7:17               ` WANG Chao
2014-04-17  7:30                 ` Dave Young
2014-04-17  8:42                   ` WANG Chao
2014-04-17  9:45                     ` Dave Young
2014-04-17 10:38                       ` WANG Chao
2014-04-17  5:48     ` WANG Chao
2014-04-17  5:58       ` Dave Young
2014-04-21  0:01         ` Simon Horman [this message]
2014-04-21  2:49           ` WANG Chao
2014-04-21 15:16             ` Dave Young
2014-04-17  5:38 ` [PATCH v6 0/9] kexec-tools, x86: E820 memmap pass " Dave Young
2014-04-17  6:24 ` WANG Chao
2014-04-17 21:38   ` Linn Crosetto
2014-04-18 19:57   ` Linn Crosetto
2014-04-17  7:32 ` 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=20140421000103.GC32087@verge.net.au \
    --to=horms@verge.net.au \
    --cc=chaowang@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=kexec@lists.infradead.org \
    --cc=linn@hp.com \
    --cc=trenn@suse.de \
    --cc=vgoyal@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox