All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Anand <panand@redhat.com>
To: ats-kumagai@wm.jp.nec.com
Cc: Pratyush Anand <panand@redhat.com>,
	dyoung@redhat.com, kexec@lists.infradead.org, bhe@redhat.com
Subject: [Makedumpfile Patch v2 2/7] initial(): call cach_init() a bit early
Date: Tue, 28 Feb 2017 11:22:36 +0530	[thread overview]
Message-ID: <17681897e6f793895e0dcfd3b83eb07f25ae6ed5.1488260510.git.panand@redhat.com> (raw)
In-Reply-To: <cover.1488260510.git.panand@redhat.com>
In-Reply-To: <cover.1488260510.git.panand@redhat.com>

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()

Signed-off-by: Pratyush Anand <panand@redhat.com>
---
 makedumpfile.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 6942047199de..3b8e9810468d 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -3878,6 +3878,9 @@ initial(void)
 	if (!get_value_for_old_linux())
 		return FALSE;
 
+	if (!is_xen_memory() && !cache_init())
+		return FALSE;
+
 	if (info->flag_mem_usage && !get_kcore_dump_loads())
 		return FALSE;
 
@@ -4000,9 +4003,6 @@ out:
 		}
 	}
 
-	if (!is_xen_memory() && !cache_init())
-		return FALSE;
-
 	if (debug_info && !get_machdep_info())
 		return FALSE;
 
-- 
2.9.3


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

  parent reply	other threads:[~2017-02-28  5:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28  5:52 [Makedumpfile Patch v2 0/7] Fix --mem-usage /proc/kcore Pratyush Anand
2017-02-28  5:52 ` [Makedumpfile Patch v2 1/7] show_mem_usage(): calculate page offset after elf load Pratyush Anand
2017-02-28  5:52 ` Pratyush Anand [this message]
2017-02-28  5:52 ` [Makedumpfile Patch v2 3/7] x86_64: check physical address in PT_LOAD for none direct mapped regions Pratyush Anand
2017-02-28  5:52 ` [Makedumpfile Patch v2 4/7] elf_info: kcore: check for invalid physical address Pratyush Anand
2017-02-28  5:52 ` [Makedumpfile Patch v2 5/7] makedumpfile: Correct the calculation of kvaddr in set_kcore_vmcoreinfo Pratyush Anand
2017-02-28  5:52 ` [Makedumpfile Patch v2 6/7] makedumpfile: Discard process_dump_load Pratyush Anand
2017-02-28  5:52 ` [Makedumpfile Patch v2 7/7] mem-usage: allow to work only with -f for kernel version < 4.11 Pratyush Anand
2017-03-02  4:49   ` Atsushi Kumagai
2017-03-02  5:47     ` Pratyush Anand
2017-03-02  5:48     ` Pratyush Anand
2017-03-02  7:29       ` Atsushi Kumagai
2017-02-28 15:05 ` [Makedumpfile Patch v2 0/7] Fix --mem-usage /proc/kcore 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=17681897e6f793895e0dcfd3b83eb07f25ae6ed5.1488260510.git.panand@redhat.com \
    --to=panand@redhat.com \
    --cc=ats-kumagai@wm.jp.nec.com \
    --cc=bhe@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=kexec@lists.infradead.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.