From: Jingbai Ma <jingbai.ma@hp.com>
To: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: bhe@redhat.com, nishimura@mxp.nes.nec.co.jp,
usui@mxm.nes.nec.co.jp, lisa.mitchell@hp.com, vgoyal@redhat.com,
ruyang@redhat.com, tachibana@mxm.nes.nec.co.jp,
anderson@redhat.com, chaowang@redhat.com,
kumagai-atsushi@mxc.nes.nec.co.jp, kexec@lists.infradead.org,
Jingbai Ma <jingbai.ma@hp.com>,
crash-utility@redhat.com
Subject: Re: [PATCH v3] makedumpfile: fix max_mapnr issue on system has over 44-bit addressing
Date: Tue, 15 Oct 2013 15:55:51 +0800 [thread overview]
Message-ID: <525CF507.7000705@hp.com> (raw)
In-Reply-To: <525CD97B.3070209@jp.fujitsu.com>
On 10/15/2013 01:58 PM, HATAYAMA Daisuke wrote:
> (2013/10/14 21:16), Jingbai Ma wrote:
> <cut>
>> @@ -125,7 +126,7 @@ get_max_mapnr(void)
>> unsigned long long max_paddr;
>>
>> if (info->flag_refiltering) {
>> - info->max_mapnr = info->dh_memory->max_mapnr;
>> + info->max_mapnr = info->kh_memory->max_mapnr_64;
>> return TRUE;
>> }
>>
>
> Please:
>
> if (dh.header_version < 6)
> info->max_mapnr = info->dh_memmory->max_mapnr;
> else
> info->max_mapnr = info->kh_memory->max_mapnr_64;
If we deal the max_mapnr_64 as below I did, we do not have to check
header_version everywhere when we need to the value max_mapnr. I just
set it to max_mapnr_64 regardless it's old version or new in the first
place we get it. It can simplify the code logic in all code. Or we have
to add this version check, it's also error prone.
>
>> @@ -783,6 +784,10 @@ get_kdump_compressed_header_info(char *filename)
>> ERRMSG("header does not have dump_level member\n");
>> return FALSE;
>> }
>> +
>> + if (dh.header_version < 6)
>> + kh.max_mapnr_64 = dh.max_mapnr;
>> +
>
> Again, please don't do this. It's confusing if in-memory header data
> is not identical to in-disk one.
>
I have explained the reason why I set the kh.max_mapnr_64 for old
version here.
If you still think we shouldn't change this value, and should check
header_version everywhere when need max_mapnr, I will send a new version
to change it.
--
Thanks,
Jingbai Ma
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-10-15 7:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 12:16 [PATCH v3] makedumpfile: fix max_mapnr issue on system has over 44-bit addressing Jingbai Ma
2013-10-15 5:58 ` HATAYAMA Daisuke
2013-10-15 7:32 ` HATAYAMA Daisuke
2013-10-15 7:55 ` Jingbai Ma [this message]
2013-10-15 8:22 ` HATAYAMA Daisuke
2013-10-15 8:29 ` Jingbai Ma
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=525CF507.7000705@hp.com \
--to=jingbai.ma@hp.com \
--cc=anderson@redhat.com \
--cc=bhe@redhat.com \
--cc=chaowang@redhat.com \
--cc=crash-utility@redhat.com \
--cc=d.hatayama@jp.fujitsu.com \
--cc=kexec@lists.infradead.org \
--cc=kumagai-atsushi@mxc.nes.nec.co.jp \
--cc=lisa.mitchell@hp.com \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=ruyang@redhat.com \
--cc=tachibana@mxm.nes.nec.co.jp \
--cc=usui@mxm.nes.nec.co.jp \
--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