From: Petr Tesarik <ptesarik@suse.cz>
To: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Cc: "d.hatayama@jp.fujitsu.com" <d.hatayama@jp.fujitsu.com>,
"holzheu@linux.vnet.ibm.com" <holzheu@linux.vnet.ibm.com>,
"kexec@lists.infradead.org" <kexec@lists.infradead.org>
Subject: Re: [PATCH 2/2] makedumpfile: Use max_pfn from mem_map array
Date: Tue, 1 Apr 2014 10:11:26 +0200 [thread overview]
Message-ID: <20140401101126.767549bc@hananiah.suse.cz> (raw)
In-Reply-To: <0910DD04CBD6DE4193FCF86B9C00BE971FBB75@BPXM01GP.gisp.nec.co.jp>
On Tue, 1 Apr 2014 05:06:33 +0000
Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp> wrote:
> [...]
> >>
> >> In the first place, we shouldn't truncate max_mapnr
> >> based on dom0's mem_section since there are some domU's
> >> memories on Xen dumps. Now, I think a better way for Xen
> >> is just leaving max_mapnr as it is.
> >>
> >> Do you agree with my view ?
> >
> >Definitely! For Xen, info->max_mapnr gives the maximum machine PFN
> >(ie. it corresponds to total memory installed in the machine).
> >
> >The data in mem_section describes Dom0 kernel memory map (and gets
> >initialized from info->dom0_mapnr). It may be substantially smaller
> >than info->max_mapnr...
>
> Thanks for your confirming.
>
> >A "clean" solution would be to change info->max_mapnr so that it always
> >gives the maximum physical PFN, but that doesn't fly very well in
> >practice, because memory bitmaps and other stuff must still be sized
> >according to the number of machine PFNs, so I would have to add special
> >cases all around the place...
>
> I don't know how to capture a dump on Xen well, so do you have any idea
> how to produce the difference between actual memory regions and the ELF
> header like the s390 case ?
I don't quite see what would be the Xen equivalent. Like I said in a
previous mail, memory regions under Xen are sized by Dom0's max_pfn, so
it makes no sense to set this value back from the memory regions.
> If it isn't possible, we don't need to change info->max_mapnr since the
> value calculated from the ELF header must be correct.
Ah, if we're talking about the ELF headers, then the extents are
determined by kexec-tools using information passed on by the Xen
hypervisor on boot. If the available memory is reduced using Xen's mem=
or availmem= command line parameter, then these headers are correct.
AFAIK there is no mechanism to change the amount of RAM used by the
hypervisor at run-time.
In short, I agree that the adjustment should be simply skipped for Xen,
exactly as you proposed in your patch:
+ if (!is_xen_memory()) {
+ for (i = 0; i < info->num_mem_map; i++) {
+ if (info->mem_map_data[i].mem_map == NOT_MEMMAP_ADDR)
+ continue;
+ max_pfn = MAX(max_pfn, info->mem_map_data[i].pfn_end);
+ }
+ info->max_mapnr = MIN(info->max_mapnr, max_pfn);
+ }
Petr T
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2014-04-01 8:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 16:14 [PATCH 2/2] makedumpfile: Use max_pfn from mem_map array Michael Holzheu
2014-03-26 9:55 ` HATAYAMA Daisuke
2014-03-26 17:54 ` Michael Holzheu
2014-03-27 5:19 ` Atsushi Kumagai
2014-03-27 13:54 ` Michael Holzheu
2014-03-28 11:00 ` Petr Tesarik
2014-03-28 15:54 ` Michael Holzheu
2014-03-28 16:46 ` Michael Holzheu
2014-03-28 16:53 ` Petr Tesarik
2014-03-31 9:48 ` Atsushi Kumagai
2014-03-31 10:37 ` Petr Tesarik
2014-04-01 5:06 ` Atsushi Kumagai
2014-04-01 8:11 ` Petr Tesarik [this message]
2014-04-01 9:20 ` Michael Holzheu
2014-04-03 2:38 ` Atsushi Kumagai
2014-03-31 12:59 ` Michael Holzheu
2014-03-31 10:27 ` Petr Tesarik
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=20140401101126.767549bc@hananiah.suse.cz \
--to=ptesarik@suse.cz \
--cc=d.hatayama@jp.fujitsu.com \
--cc=holzheu@linux.vnet.ibm.com \
--cc=kexec@lists.infradead.org \
--cc=kumagai-atsushi@mxc.nes.nec.co.jp \
/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