All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hatayama, Daisuke" <d.hatayama@jp.fujitsu.com>
To: 'Atsushi Kumagai' <ats-kumagai@wm.jp.nec.com>,
	Pratyush Anand <panand@redhat.com>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"dyoung@redhat.com" <dyoung@redhat.com>,
	"bhe@redhat.com" <bhe@redhat.com>
Subject: RE: [Makedumpfile Patch v3 2/7] initial(): call cach_init() a bit early
Date: Thu, 20 Jul 2017 08:01:40 +0000	[thread overview]
Message-ID: <33710E6CAA200E4583255F4FB666C4E20D32CF98@G01JPEXMBYT03> (raw)
In-Reply-To: <0910DD04CBD6DE4193FCF86B9C00BE9701EF2947@BPXM01GP.gisp.nec.co.jp>



> -----Original Message-----
> From: Atsushi Kumagai [mailto:ats-kumagai@wm.jp.nec.com]
> Sent: Thursday, July 20, 2017 3:54 PM
> To: Pratyush Anand <panand@redhat.com>
> Cc: dyoung@redhat.com; Hatayama, Daisuke
> <d.hatayama@jp.fujitsu.com>; kexec@lists.infradead.org; bhe@redhat.com
> Subject: RE: [Makedumpfile Patch v3 2/7] initial(): call cach_init() a bit
> early
> 
> >Hi Atsushi,
> >
> >On Wednesday 19 July 2017 01:16 PM, Atsushi Kumagai wrote:
> >> Hello Pratyush,
> >>
> >>> Call cach_init() before get_kcore_dump_loads(), because latter uses
> >>> cache_search().
> >>>
> >>> Call path is like this :
> >>> get_kcore_dump_loads() -> process_dump_load() -> vaddr_to_paddr() ->
> >>> vtop4_x86_64() -> readmem() -> cache_search()
> >>
> >> I found that the current cach_init() is too early, cache_init() should be
> >> called after fallback_to_current_page_size() for older kernel
> >> which doesn't have VMCOREINFO.
> >> Could you confirm that the patch below is fine with you ?
> >
> >Its fine and works.
> 
> Thanks, I'll merge this fix into v1.6.2.
> 

It looks good also to me.

Thanks.
HATAYAMA, Daisuke

> Regards,
> Atsushi Kumagai
> 
> >>
> >> Thanks,
> >> Atsushi Kumagai
> >>
> >> From: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
> >> Date: Wed, 19 Jul 2017 15:05:58 +0900
> >> Subject: [PATCH] Fix the regression caused by moving cache_init() earlier
> >>
> >> info->page_size should be set before calling cache_init() since it
> >> allocates some buffers based on info->page_size. However, cache_init()
> >> was moved before fallback_to_current_page_size() while it set
> >> info->page_size for older kernel which doesn't have VMCOREINFO.
> >>
> >> This patch moves cache_init() after fallback_to_current_page_size()
> >> and reverts the commit: b98e6e0d2a(sadump: set info->page_size before
> cache_init())
> >>
> >> Signed-off-by: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
> >> ---
> >>  makedumpfile.c | 28 ++++++++++++++++------------
> >>  1 file changed, 16 insertions(+), 12 deletions(-)
> >>
> >> diff --git a/makedumpfile.c b/makedumpfile.c
> >> index a3f0697..f85003a 100644
> >> --- a/makedumpfile.c
> >> +++ b/makedumpfile.c
> >> @@ -3905,15 +3905,6 @@ initial(void)
> >>  	if (!get_value_for_old_linux())
> >>  		return FALSE;
> >>
> >> -	if (info->flag_sadump && !set_page_size(sadump_page_size()))
> >> -			return FALSE;
> >> -
> >> -	if (!is_xen_memory() && !cache_init())
> >> -		return FALSE;
> >> -
> >> -	if (info->flag_mem_usage && !get_kcore_dump_loads())
> >> -		return FALSE;
> >> -
> >>  	if (info->flag_refiltering) {
> >>  		if (info->flag_elf_dumpfile) {
> >>  			MSG("'-E' option is disable, ");
> >> @@ -3936,6 +3927,9 @@ initial(void)
> >>  			return FALSE;
> >>  		}
> >>
> >> +		if (!set_page_size(sadump_page_size()))
> >> +			return FALSE;
> >> +
> >>  		if (!sadump_initialize_bitmap_memory())
> >>  			return FALSE;
> >>
> >> @@ -3949,9 +3943,7 @@ initial(void)
> >>  		 * postponed until debug information becomes
> >>  		 * available.
> >>  		 */
> >> -
> >> -	} else if (!get_phys_base())
> >> -		return FALSE;
> >> +	}
> >>
> >>  out:
> >>  	if (!info->page_size) {
> >> @@ -3962,6 +3954,18 @@ out:
> >>  		if (!fallback_to_current_page_size())
> >>  			return FALSE;
> >>  	}
> >> +
> >> +	if (!is_xen_memory() && !cache_init())
> >> +		return FALSE;
> >> +
> >> +	if (info->flag_mem_usage && !get_kcore_dump_loads())
> >> +		return FALSE;
> >> +
> >> +	if (!info->flag_refiltering && !info->flag_sadump) {
> >> +		if (!get_phys_base())
> >> +			return FALSE;
> >> +	}
> >> +
> >>  	if (!get_max_mapnr())
> >>  		return FALSE;
> >>
> >>
> >
> >--
> >Regards
> >Pratyush
> 
> 
> 



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

  reply	other threads:[~2017-07-20  8:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02  8:36 [Makedumpfile Patch v3 0/7] Fix --mem-usage /proc/kcore Pratyush Anand
2017-03-02  8:36 ` [Makedumpfile Patch v3 1/7] show_mem_usage(): calculate page offset after elf load Pratyush Anand
2017-03-02  8:36 ` [Makedumpfile Patch v3 2/7] initial(): call cach_init() a bit early Pratyush Anand
2017-07-19  7:46   ` Atsushi Kumagai
2017-07-19 11:20     ` Pratyush Anand
2017-07-20  6:54       ` Atsushi Kumagai
2017-07-20  8:01         ` Hatayama, Daisuke [this message]
2017-03-02  8:36 ` [Makedumpfile Patch v3 3/7] x86_64: check physical address in PT_LOAD for none direct mapped regions Pratyush Anand
2017-03-02  8:36 ` [Makedumpfile Patch v3 4/7] elf_info: kcore: check for invalid physical address Pratyush Anand
2017-03-02  8:36 ` [Makedumpfile Patch v3 5/7] makedumpfile: Correct the calculation of kvaddr in set_kcore_vmcoreinfo Pratyush Anand
2017-03-02  8:36 ` [Makedumpfile Patch v3 6/7] makedumpfile: Discard process_dump_load Pratyush Anand
2017-03-02  8:36 ` [Makedumpfile Patch v3 7/7] mem-usage: allow to work only with -f for kernel version < 4.11 Pratyush Anand
2017-03-03  2:10   ` Atsushi Kumagai
2017-03-03  2:48     ` Pratyush Anand
2017-03-03  3:07       ` bhe
2017-03-03  4:35         ` Atsushi Kumagai
2017-03-03  4:56           ` Pratyush Anand

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=33710E6CAA200E4583255F4FB666C4E20D32CF98@G01JPEXMBYT03 \
    --to=d.hatayama@jp.fujitsu.com \
    --cc=ats-kumagai@wm.jp.nec.com \
    --cc=bhe@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=panand@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 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.