All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups
@ 2013-12-02 14:16 Daniel Kiper
  2013-12-02 14:16 ` [PATCH v2 1/4] makedumpfile/xen: Add cache_init() call to initial_xen() Daniel Kiper
                   ` (7 more replies)
  0 siblings, 8 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-02 14:16 UTC (permalink / raw)
  To: andrew.cooper3, david.vrabel, kumagai-atsushi, kexec, xen-devel

Hi,

This is second version of patch series containing following
makedumpfile Xen fixes and cleanups:
  - makedumpfile/xen: Add cache_init() call to initial_xen(),
  - makedumpfile/xen: Disable cyclic mode for every Xen crash dump,
  - makedumpfile/xen: Fail immediately on every architecture if dump level is invalid,
  - makedumpfile/xen: Move cyclic mode check from initial() to initial_xen().

All patches were tested with Xen versions up to latest unstable.

Please apply.

Daniel


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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2 1/4] makedumpfile/xen: Add cache_init() call to initial_xen()
  2013-12-02 14:16 [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups Daniel Kiper
@ 2013-12-02 14:16 ` Daniel Kiper
  2013-12-02 14:16 ` Daniel Kiper
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-02 14:16 UTC (permalink / raw)
  To: andrew.cooper3, david.vrabel, kumagai-atsushi, kexec, xen-devel
  Cc: Daniel Kiper

Commit 92563d7a7a5175ef78c4a94ee269b1b455331b4c (cache: Allocate buffers
at initialization to detect malloc() failure) split cache_alloc() to
cache_init() and cache_alloc(). cache_init() is called in initial().
However, sadly initial_xen() is called before cache_init() and it uses
cache_alloc() indirectly which refers to uninitialized structures.
Hence, makedumfile run on Xen crash dumps finally fails. This patch adds
cache_init() call to initial_xen() and fixes above mentioned issue.
cache_init() is called in initial() if crash dump is not Xen one.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 makedumpfile.c |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 0c68f32..55e53b7 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -3117,7 +3117,7 @@ out:
 		DEBUG_MSG("Buffer size for the cyclic mode: %ld\n", info->bufsize_cyclic);
 	}
 
-	if (!cache_init())
+	if (!is_xen_memory() && !cache_init())
 		return FALSE;
 
 	if (debug_info) {
@@ -7622,6 +7622,7 @@ exclude_xen_user_domain(void)
 int
 initial_xen(void)
 {
+	int xen_info_required = TRUE;
 	off_t offset;
 	unsigned long size;
 
@@ -7673,8 +7674,10 @@ initial_xen(void)
 		 * and get both the offset and the size.
 		 */
 		if (!has_vmcoreinfo_xen()){
-			if (!info->flag_exclude_xen_dom)
+			if (!info->flag_exclude_xen_dom) {
+				xen_info_required = FALSE;
 				goto out;
+			}
 
 			MSG("%s doesn't contain a vmcoreinfo for Xen.\n",
 			    info->name_memory);
@@ -7691,6 +7694,7 @@ initial_xen(void)
 			return FALSE;
 	}
 
+out:
 	if (!info->page_size) {
 		/*
 		 * If we cannot get page_size from a vmcoreinfo file,
@@ -7700,12 +7704,17 @@ initial_xen(void)
 			return FALSE;
 	}
 
-	if (!get_xen_info())
+	if (!cache_init())
 		return FALSE;
 
-	if (message_level & ML_PRINT_DEBUG_MSG)
-		show_data_xen();
-out:
+	if (xen_info_required == TRUE) {
+		if (!get_xen_info())
+			return FALSE;
+
+		if (message_level & ML_PRINT_DEBUG_MSG)
+			show_data_xen();
+	}
+
 	if (!get_max_mapnr())
 		return FALSE;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 1/4] makedumpfile/xen: Add cache_init() call to initial_xen()
  2013-12-02 14:16 [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups Daniel Kiper
  2013-12-02 14:16 ` [PATCH v2 1/4] makedumpfile/xen: Add cache_init() call to initial_xen() Daniel Kiper
@ 2013-12-02 14:16 ` Daniel Kiper
  2013-12-02 14:16 ` [PATCH v2 2/4] makedumpfile/xen: Disable cyclic mode for every Xen crash dump Daniel Kiper
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-02 14:16 UTC (permalink / raw)
  To: andrew.cooper3, david.vrabel, kumagai-atsushi, kexec, xen-devel
  Cc: Daniel Kiper

Commit 92563d7a7a5175ef78c4a94ee269b1b455331b4c (cache: Allocate buffers
at initialization to detect malloc() failure) split cache_alloc() to
cache_init() and cache_alloc(). cache_init() is called in initial().
However, sadly initial_xen() is called before cache_init() and it uses
cache_alloc() indirectly which refers to uninitialized structures.
Hence, makedumfile run on Xen crash dumps finally fails. This patch adds
cache_init() call to initial_xen() and fixes above mentioned issue.
cache_init() is called in initial() if crash dump is not Xen one.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 makedumpfile.c |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 0c68f32..55e53b7 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -3117,7 +3117,7 @@ out:
 		DEBUG_MSG("Buffer size for the cyclic mode: %ld\n", info->bufsize_cyclic);
 	}
 
-	if (!cache_init())
+	if (!is_xen_memory() && !cache_init())
 		return FALSE;
 
 	if (debug_info) {
@@ -7622,6 +7622,7 @@ exclude_xen_user_domain(void)
 int
 initial_xen(void)
 {
+	int xen_info_required = TRUE;
 	off_t offset;
 	unsigned long size;
 
@@ -7673,8 +7674,10 @@ initial_xen(void)
 		 * and get both the offset and the size.
 		 */
 		if (!has_vmcoreinfo_xen()){
-			if (!info->flag_exclude_xen_dom)
+			if (!info->flag_exclude_xen_dom) {
+				xen_info_required = FALSE;
 				goto out;
+			}
 
 			MSG("%s doesn't contain a vmcoreinfo for Xen.\n",
 			    info->name_memory);
@@ -7691,6 +7694,7 @@ initial_xen(void)
 			return FALSE;
 	}
 
+out:
 	if (!info->page_size) {
 		/*
 		 * If we cannot get page_size from a vmcoreinfo file,
@@ -7700,12 +7704,17 @@ initial_xen(void)
 			return FALSE;
 	}
 
-	if (!get_xen_info())
+	if (!cache_init())
 		return FALSE;
 
-	if (message_level & ML_PRINT_DEBUG_MSG)
-		show_data_xen();
-out:
+	if (xen_info_required == TRUE) {
+		if (!get_xen_info())
+			return FALSE;
+
+		if (message_level & ML_PRINT_DEBUG_MSG)
+			show_data_xen();
+	}
+
 	if (!get_max_mapnr())
 		return FALSE;
 
-- 
1.7.10.4


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

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 2/4] makedumpfile/xen: Disable cyclic mode for every Xen crash dump
  2013-12-02 14:16 [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups Daniel Kiper
                   ` (2 preceding siblings ...)
  2013-12-02 14:16 ` [PATCH v2 2/4] makedumpfile/xen: Disable cyclic mode for every Xen crash dump Daniel Kiper
@ 2013-12-02 14:16 ` Daniel Kiper
  2013-12-02 14:16 ` [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid Daniel Kiper
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-02 14:16 UTC (permalink / raw)
  To: andrew.cooper3, david.vrabel, kumagai-atsushi, kexec, xen-devel
  Cc: Daniel Kiper

Disable cyclic mode for every Xen crash dump not only when -X option
is used. This way makedumpfile is much more flexible and different
modes could be used to dump whole system memory (e.g. zero pages
could be striped without requiring -X option).

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 makedumpfile.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 55e53b7..5a378d1 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -2928,20 +2928,20 @@ initial(void)
 	}
 #endif
 
-	if (info->flag_exclude_xen_dom) {
+	if (is_xen_memory()) {
 		if(info->flag_cyclic) {
 			info->flag_cyclic = FALSE;
 			MSG("Switched running mode from cyclic to non-cyclic,\n");
 			MSG("because the cyclic mode doesn't support Xen.\n");
 		}
+	}
 
-		if (!is_xen_memory()) {
-			MSG("'-X' option is disable,");
-			MSG("because %s is not Xen's memory core image.\n", info->name_memory);
-			MSG("Commandline parameter is invalid.\n");
-			MSG("Try `makedumpfile --help' for more information.\n");
-			return FALSE;
-		}
+	if (info->flag_exclude_xen_dom && !is_xen_memory()) {
+		MSG("'-X' option is disable,");
+		MSG("because %s is not Xen's memory core image.\n", info->name_memory);
+		MSG("Commandline parameter is invalid.\n");
+		MSG("Try `makedumpfile --help' for more information.\n");
+		return FALSE;
 	}
 
 	if (info->flag_refiltering) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 2/4] makedumpfile/xen: Disable cyclic mode for every Xen crash dump
  2013-12-02 14:16 [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups Daniel Kiper
  2013-12-02 14:16 ` [PATCH v2 1/4] makedumpfile/xen: Add cache_init() call to initial_xen() Daniel Kiper
  2013-12-02 14:16 ` Daniel Kiper
@ 2013-12-02 14:16 ` Daniel Kiper
  2013-12-02 14:16 ` Daniel Kiper
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-02 14:16 UTC (permalink / raw)
  To: andrew.cooper3, david.vrabel, kumagai-atsushi, kexec, xen-devel
  Cc: Daniel Kiper

Disable cyclic mode for every Xen crash dump not only when -X option
is used. This way makedumpfile is much more flexible and different
modes could be used to dump whole system memory (e.g. zero pages
could be striped without requiring -X option).

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 makedumpfile.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 55e53b7..5a378d1 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -2928,20 +2928,20 @@ initial(void)
 	}
 #endif
 
-	if (info->flag_exclude_xen_dom) {
+	if (is_xen_memory()) {
 		if(info->flag_cyclic) {
 			info->flag_cyclic = FALSE;
 			MSG("Switched running mode from cyclic to non-cyclic,\n");
 			MSG("because the cyclic mode doesn't support Xen.\n");
 		}
+	}
 
-		if (!is_xen_memory()) {
-			MSG("'-X' option is disable,");
-			MSG("because %s is not Xen's memory core image.\n", info->name_memory);
-			MSG("Commandline parameter is invalid.\n");
-			MSG("Try `makedumpfile --help' for more information.\n");
-			return FALSE;
-		}
+	if (info->flag_exclude_xen_dom && !is_xen_memory()) {
+		MSG("'-X' option is disable,");
+		MSG("because %s is not Xen's memory core image.\n", info->name_memory);
+		MSG("Commandline parameter is invalid.\n");
+		MSG("Try `makedumpfile --help' for more information.\n");
+		return FALSE;
 	}
 
 	if (info->flag_refiltering) {
-- 
1.7.10.4


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

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-02 14:16 [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups Daniel Kiper
                   ` (4 preceding siblings ...)
  2013-12-02 14:16 ` [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid Daniel Kiper
@ 2013-12-02 14:16 ` Daniel Kiper
  2013-12-02 14:16 ` [PATCH v2 4/4] makedumpfile/xen: Move cyclic mode check from initial() to initial_xen() Daniel Kiper
  2013-12-02 14:16 ` Daniel Kiper
  7 siblings, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-02 14:16 UTC (permalink / raw)
  To: andrew.cooper3, david.vrabel, kumagai-atsushi, kexec, xen-devel
  Cc: Daniel Kiper

Do not try to process Xen crash dump on every architecture if dump level
is invalid. Fail immediately and print relevant error message.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 5a378d1..45f96aa 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+
 	if (!init_xen_crash_info())
 		return FALSE;
 	/*
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-02 14:16 [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups Daniel Kiper
                   ` (3 preceding siblings ...)
  2013-12-02 14:16 ` Daniel Kiper
@ 2013-12-02 14:16 ` Daniel Kiper
  2013-12-03  5:27   ` Atsushi Kumagai
  2013-12-03  5:27   ` Atsushi Kumagai
  2013-12-02 14:16 ` Daniel Kiper
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-02 14:16 UTC (permalink / raw)
  To: andrew.cooper3, david.vrabel, kumagai-atsushi, kexec, xen-devel
  Cc: Daniel Kiper

Do not try to process Xen crash dump on every architecture if dump level
is invalid. Fail immediately and print relevant error message.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 makedumpfile.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 5a378d1..45f96aa 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -7637,14 +7637,14 @@ initial_xen(void)
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#ifndef __x86_64__
+
 	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
 		MSG("Dump_level is invalid. It should be 0 or 1.\n");
 		MSG("Commandline parameter is invalid.\n");
 		MSG("Try `makedumpfile --help' for more information.\n");
 		return FALSE;
 	}
-#endif
+
 	if (!init_xen_crash_info())
 		return FALSE;
 	/*
-- 
1.7.10.4


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

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 4/4] makedumpfile/xen: Move cyclic mode check from initial() to initial_xen()
  2013-12-02 14:16 [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups Daniel Kiper
                   ` (5 preceding siblings ...)
  2013-12-02 14:16 ` Daniel Kiper
@ 2013-12-02 14:16 ` Daniel Kiper
  2013-12-02 14:16 ` Daniel Kiper
  7 siblings, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-02 14:16 UTC (permalink / raw)
  To: andrew.cooper3, david.vrabel, kumagai-atsushi, kexec, xen-devel
  Cc: Daniel Kiper

Move cyclic mode check from initial() to initial_xen(). Just small cleanup.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 makedumpfile.c |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 45f96aa..e173f85 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -2928,14 +2928,6 @@ initial(void)
 	}
 #endif
 
-	if (is_xen_memory()) {
-		if(info->flag_cyclic) {
-			info->flag_cyclic = FALSE;
-			MSG("Switched running mode from cyclic to non-cyclic,\n");
-			MSG("because the cyclic mode doesn't support Xen.\n");
-		}
-	}
-
 	if (info->flag_exclude_xen_dom && !is_xen_memory()) {
 		MSG("'-X' option is disable,");
 		MSG("because %s is not Xen's memory core image.\n", info->name_memory);
@@ -7645,6 +7637,12 @@ initial_xen(void)
 		return FALSE;
 	}
 
+	if(info->flag_cyclic) {
+		info->flag_cyclic = FALSE;
+		MSG("Switched running mode from cyclic to non-cyclic,\n");
+		MSG("because the cyclic mode doesn't support Xen.\n");
+	}
+
 	if (!init_xen_crash_info())
 		return FALSE;
 	/*
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 4/4] makedumpfile/xen: Move cyclic mode check from initial() to initial_xen()
  2013-12-02 14:16 [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups Daniel Kiper
                   ` (6 preceding siblings ...)
  2013-12-02 14:16 ` [PATCH v2 4/4] makedumpfile/xen: Move cyclic mode check from initial() to initial_xen() Daniel Kiper
@ 2013-12-02 14:16 ` Daniel Kiper
  7 siblings, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-02 14:16 UTC (permalink / raw)
  To: andrew.cooper3, david.vrabel, kumagai-atsushi, kexec, xen-devel
  Cc: Daniel Kiper

Move cyclic mode check from initial() to initial_xen(). Just small cleanup.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 makedumpfile.c |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 45f96aa..e173f85 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -2928,14 +2928,6 @@ initial(void)
 	}
 #endif
 
-	if (is_xen_memory()) {
-		if(info->flag_cyclic) {
-			info->flag_cyclic = FALSE;
-			MSG("Switched running mode from cyclic to non-cyclic,\n");
-			MSG("because the cyclic mode doesn't support Xen.\n");
-		}
-	}
-
 	if (info->flag_exclude_xen_dom && !is_xen_memory()) {
 		MSG("'-X' option is disable,");
 		MSG("because %s is not Xen's memory core image.\n", info->name_memory);
@@ -7645,6 +7637,12 @@ initial_xen(void)
 		return FALSE;
 	}
 
+	if(info->flag_cyclic) {
+		info->flag_cyclic = FALSE;
+		MSG("Switched running mode from cyclic to non-cyclic,\n");
+		MSG("because the cyclic mode doesn't support Xen.\n");
+	}
+
 	if (!init_xen_crash_info())
 		return FALSE;
 	/*
-- 
1.7.10.4


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

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-02 14:16 ` [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid Daniel Kiper
  2013-12-03  5:27   ` Atsushi Kumagai
@ 2013-12-03  5:27   ` Atsushi Kumagai
  1 sibling, 0 replies; 24+ messages in thread
From: Atsushi Kumagai @ 2013-12-03  5:27 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: andrew.cooper3, kexec, david.vrabel, Kenichi Oomichi, xen-devel

On 2013/12/02 23:17:59, kexec <kexec-bounces@lists.infradead.org> wrote:
> Do not try to process Xen crash dump on every architecture if dump level
> is invalid. Fail immediately and print relevant error message.
> 
> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
>  makedumpfile.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/makedumpfile.c b/makedumpfile.c
> index 5a378d1..45f96aa 100644
> --- a/makedumpfile.c
> +++ b/makedumpfile.c
> @@ -7637,14 +7637,14 @@ initial_xen(void)
>  		MSG("Try `makedumpfile --help' for more information.\n");
>  		return FALSE;
>  	}
> -#ifndef __x86_64__
> +
>  	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
>  		MSG("Dump_level is invalid. It should be 0 or 1.\n");
>  		MSG("Commandline parameter is invalid.\n");
>  		MSG("Try `makedumpfile --help' for more information.\n");
>  		return FALSE;
>  	}
> -#endif
> +

Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
I thought it works by the patch below, but I'm not sure about Xen.
So I would like to know why you sent this patch.


commit ec5b5835a113cf62a168d4a7354564a38de6b52c
Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

    [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

    This patch adds the dump filtering for excluding unnecessary pages (cache
    pages, user process data pages, and free pages) on on x86_64 xen domain-0.

    On the existing makedumpfile (v1.3.3 or former), a user could specify 0
    or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
    also as a dump_level.

    Now, this feature is effective on x86_64 machine only.


Thanks
Atsushi Kumagai

>  	if (!init_xen_crash_info())
>  		return FALSE;
>  	/*
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-02 14:16 ` [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid Daniel Kiper
@ 2013-12-03  5:27   ` Atsushi Kumagai
  2013-12-03 19:45     ` Daniel Kiper
  2013-12-03 19:45     ` Daniel Kiper
  2013-12-03  5:27   ` Atsushi Kumagai
  1 sibling, 2 replies; 24+ messages in thread
From: Atsushi Kumagai @ 2013-12-03  5:27 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: andrew.cooper3, kexec, david.vrabel, Kenichi Oomichi, xen-devel

On 2013/12/02 23:17:59, kexec <kexec-bounces@lists.infradead.org> wrote:
> Do not try to process Xen crash dump on every architecture if dump level
> is invalid. Fail immediately and print relevant error message.
> 
> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
>  makedumpfile.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/makedumpfile.c b/makedumpfile.c
> index 5a378d1..45f96aa 100644
> --- a/makedumpfile.c
> +++ b/makedumpfile.c
> @@ -7637,14 +7637,14 @@ initial_xen(void)
>  		MSG("Try `makedumpfile --help' for more information.\n");
>  		return FALSE;
>  	}
> -#ifndef __x86_64__
> +
>  	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
>  		MSG("Dump_level is invalid. It should be 0 or 1.\n");
>  		MSG("Commandline parameter is invalid.\n");
>  		MSG("Try `makedumpfile --help' for more information.\n");
>  		return FALSE;
>  	}
> -#endif
> +

Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
I thought it works by the patch below, but I'm not sure about Xen.
So I would like to know why you sent this patch.


commit ec5b5835a113cf62a168d4a7354564a38de6b52c
Author: ken1_ohmichi <ken1_ohmichi>
Date:   Fri Oct 9 03:05:41 2009 +0000

    [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.

    This patch adds the dump filtering for excluding unnecessary pages (cache
    pages, user process data pages, and free pages) on on x86_64 xen domain-0.

    On the existing makedumpfile (v1.3.3 or former), a user could specify 0
    or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
    also as a dump_level.

    Now, this feature is effective on x86_64 machine only.


Thanks
Atsushi Kumagai

>  	if (!init_xen_crash_info())
>  		return FALSE;
>  	/*
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
> 

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-03  5:27   ` Atsushi Kumagai
@ 2013-12-03 19:45     ` Daniel Kiper
  2013-12-03 19:45     ` Daniel Kiper
  1 sibling, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-03 19:45 UTC (permalink / raw)
  To: Atsushi Kumagai
  Cc: andrew.cooper3, kexec, david.vrabel, Kenichi Oomichi, xen-devel

On Tue, Dec 03, 2013 at 05:27:03AM +0000, Atsushi Kumagai wrote:
> On 2013/12/02 23:17:59, kexec <kexec-bounces@lists.infradead.org> wrote:
> > Do not try to process Xen crash dump on every architecture if dump level
> > is invalid. Fail immediately and print relevant error message.
> >
> > Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> > ---
> >  makedumpfile.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/makedumpfile.c b/makedumpfile.c
> > index 5a378d1..45f96aa 100644
> > --- a/makedumpfile.c
> > +++ b/makedumpfile.c
> > @@ -7637,14 +7637,14 @@ initial_xen(void)
> >  		MSG("Try `makedumpfile --help' for more information.\n");
> >  		return FALSE;
> >  	}
> > -#ifndef __x86_64__
> > +
> >  	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
> >  		MSG("Dump_level is invalid. It should be 0 or 1.\n");
> >  		MSG("Commandline parameter is invalid.\n");
> >  		MSG("Try `makedumpfile --help' for more information.\n");
> >  		return FALSE;
> >  	}
> > -#endif
> > +
>
> Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
> I thought it works by the patch below, but I'm not sure about Xen.
> So I would like to know why you sent this patch.
>
>
> commit ec5b5835a113cf62a168d4a7354564a38de6b52c
> Author: ken1_ohmichi <ken1_ohmichi>
> Date:   Fri Oct 9 03:05:41 2009 +0000
>
>     [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.
>
>     This patch adds the dump filtering for excluding unnecessary pages (cache
>     pages, user process data pages, and free pages) on on x86_64 xen domain-0.
>
>     On the existing makedumpfile (v1.3.3 or former), a user could specify 0
>     or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
>     also as a dump_level.
>
>     Now, this feature is effective on x86_64 machine only.

Hmmm... Thanks for this. I missed this patch. However, it looks that I
do not understand something. AIUI, from Xen point of view we are not able
to use dump level higher than 1 because there is no e.g. cache pages (it
looks that we could also skip free pages but this stuff is not implemented).
Above mentioned patch suggest that there is a way to extract just only Dom0
stuff taking into account Linux internals only. If my reasoning is true
then dump level higher than 1 is possible only if we look at Dom0 from Linux
point of view. However, I can not find any description how to do that.
So I am CC-ing Ken'ichi as author of this patch but I do not know that
he works for NEC still.

Daniel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-03  5:27   ` Atsushi Kumagai
  2013-12-03 19:45     ` Daniel Kiper
@ 2013-12-03 19:45     ` Daniel Kiper
  2013-12-09  2:45       ` Atsushi Kumagai
  2013-12-09  2:45       ` Atsushi Kumagai
  1 sibling, 2 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-03 19:45 UTC (permalink / raw)
  To: Atsushi Kumagai, oomichi; +Cc: andrew.cooper3, kexec, david.vrabel, xen-devel

On Tue, Dec 03, 2013 at 05:27:03AM +0000, Atsushi Kumagai wrote:
> On 2013/12/02 23:17:59, kexec <kexec-bounces@lists.infradead.org> wrote:
> > Do not try to process Xen crash dump on every architecture if dump level
> > is invalid. Fail immediately and print relevant error message.
> >
> > Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> > ---
> >  makedumpfile.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/makedumpfile.c b/makedumpfile.c
> > index 5a378d1..45f96aa 100644
> > --- a/makedumpfile.c
> > +++ b/makedumpfile.c
> > @@ -7637,14 +7637,14 @@ initial_xen(void)
> >  		MSG("Try `makedumpfile --help' for more information.\n");
> >  		return FALSE;
> >  	}
> > -#ifndef __x86_64__
> > +
> >  	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
> >  		MSG("Dump_level is invalid. It should be 0 or 1.\n");
> >  		MSG("Commandline parameter is invalid.\n");
> >  		MSG("Try `makedumpfile --help' for more information.\n");
> >  		return FALSE;
> >  	}
> > -#endif
> > +
>
> Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
> I thought it works by the patch below, but I'm not sure about Xen.
> So I would like to know why you sent this patch.
>
>
> commit ec5b5835a113cf62a168d4a7354564a38de6b52c
> Author: ken1_ohmichi <ken1_ohmichi>
> Date:   Fri Oct 9 03:05:41 2009 +0000
>
>     [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.
>
>     This patch adds the dump filtering for excluding unnecessary pages (cache
>     pages, user process data pages, and free pages) on on x86_64 xen domain-0.
>
>     On the existing makedumpfile (v1.3.3 or former), a user could specify 0
>     or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
>     also as a dump_level.
>
>     Now, this feature is effective on x86_64 machine only.

Hmmm... Thanks for this. I missed this patch. However, it looks that I
do not understand something. AIUI, from Xen point of view we are not able
to use dump level higher than 1 because there is no e.g. cache pages (it
looks that we could also skip free pages but this stuff is not implemented).
Above mentioned patch suggest that there is a way to extract just only Dom0
stuff taking into account Linux internals only. If my reasoning is true
then dump level higher than 1 is possible only if we look at Dom0 from Linux
point of view. However, I can not find any description how to do that.
So I am CC-ing Ken'ichi as author of this patch but I do not know that
he works for NEC still.

Daniel

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-03 19:45     ` Daniel Kiper
@ 2013-12-09  2:45       ` Atsushi Kumagai
  2013-12-09  2:45       ` Atsushi Kumagai
  1 sibling, 0 replies; 24+ messages in thread
From: Atsushi Kumagai @ 2013-12-09  2:45 UTC (permalink / raw)
  To: Daniel Kiper, Kenichi Oomichi
  Cc: andrew.cooper3, kexec, david.vrabel, xen-devel

On 2013/12/04 4:45:42, kexec <kexec-bounces@lists.infradead.org> wrote:
> On Tue, Dec 03, 2013 at 05:27:03AM +0000, Atsushi Kumagai wrote:
> > On 2013/12/02 23:17:59, kexec <kexec-bounces@lists.infradead.org> wrote:
> > > Do not try to process Xen crash dump on every architecture if dump level
> > > is invalid. Fail immediately and print relevant error message.
> > >
> > > Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> > > ---
> > >  makedumpfile.c |    4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/makedumpfile.c b/makedumpfile.c
> > > index 5a378d1..45f96aa 100644
> > > --- a/makedumpfile.c
> > > +++ b/makedumpfile.c
> > > @@ -7637,14 +7637,14 @@ initial_xen(void)
> > >  		MSG("Try `makedumpfile --help' for more information.\n");
> > >  		return FALSE;
> > >  	}
> > > -#ifndef __x86_64__
> > > +
> > >  	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
> > >  		MSG("Dump_level is invalid. It should be 0 or 1.\n");
> > >  		MSG("Commandline parameter is invalid.\n");
> > >  		MSG("Try `makedumpfile --help' for more information.\n");
> > >  		return FALSE;
> > >  	}
> > > -#endif
> > > +
> >
> > Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
> > I thought it works by the patch below, but I'm not sure about Xen.
> > So I would like to know why you sent this patch.
> >
> >
> > commit ec5b5835a113cf62a168d4a7354564a38de6b52c
> > Author: ken1_ohmichi <ken1_ohmichi>
> > Date:   Fri Oct 9 03:05:41 2009 +0000
> >
> >     [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.
> >
> >     This patch adds the dump filtering for excluding unnecessary pages (cache
> >     pages, user process data pages, and free pages) on on x86_64 xen domain-0.
> >
> >     On the existing makedumpfile (v1.3.3 or former), a user could specify 0
> >     or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
> >     also as a dump_level.
> >
> >     Now, this feature is effective on x86_64 machine only.
> 
> Hmmm... Thanks for this. I missed this patch. However, it looks that I
> do not understand something. AIUI, from Xen point of view we are not able
> to use dump level higher than 1 because there is no e.g. cache pages (it
> looks that we could also skip free pages but this stuff is not implemented).
> Above mentioned patch suggest that there is a way to extract just only Dom0
> stuff taking into account Linux internals only. If my reasoning is true
> then dump level higher than 1 is possible only if we look at Dom0 from Linux
> point of view. 

I've reviewed the code for Xen, my understanding is the same as yours.
The memory regions corresponding to hypervisor and DomU will remain even if
specifying the dump level higher than 1.

> However, I can not find any description how to do that.
> So I am CC-ing Ken'ichi as author of this patch but I do not know that
> he works for NEC still.

I'm sorry but I missed your point. Did you mention a lack of description
in man page about an effect when specifying the dump level higher than 1
for Xen's memory ?
At least, I still think this patch is wrong because any dump level is
effective for x86_64.

BTW, Ken'ichi still work for NEC but he is busy on other projects.


Thanks
Atsushi Kumagai

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-03 19:45     ` Daniel Kiper
  2013-12-09  2:45       ` Atsushi Kumagai
@ 2013-12-09  2:45       ` Atsushi Kumagai
  2013-12-10 10:39         ` Daniel Kiper
  2013-12-10 10:39         ` Daniel Kiper
  1 sibling, 2 replies; 24+ messages in thread
From: Atsushi Kumagai @ 2013-12-09  2:45 UTC (permalink / raw)
  To: Daniel Kiper, Kenichi Oomichi
  Cc: andrew.cooper3, kexec, david.vrabel, xen-devel

On 2013/12/04 4:45:42, kexec <kexec-bounces@lists.infradead.org> wrote:
> On Tue, Dec 03, 2013 at 05:27:03AM +0000, Atsushi Kumagai wrote:
> > On 2013/12/02 23:17:59, kexec <kexec-bounces@lists.infradead.org> wrote:
> > > Do not try to process Xen crash dump on every architecture if dump level
> > > is invalid. Fail immediately and print relevant error message.
> > >
> > > Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> > > ---
> > >  makedumpfile.c |    4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/makedumpfile.c b/makedumpfile.c
> > > index 5a378d1..45f96aa 100644
> > > --- a/makedumpfile.c
> > > +++ b/makedumpfile.c
> > > @@ -7637,14 +7637,14 @@ initial_xen(void)
> > >  		MSG("Try `makedumpfile --help' for more information.\n");
> > >  		return FALSE;
> > >  	}
> > > -#ifndef __x86_64__
> > > +
> > >  	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
> > >  		MSG("Dump_level is invalid. It should be 0 or 1.\n");
> > >  		MSG("Commandline parameter is invalid.\n");
> > >  		MSG("Try `makedumpfile --help' for more information.\n");
> > >  		return FALSE;
> > >  	}
> > > -#endif
> > > +
> >
> > Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
> > I thought it works by the patch below, but I'm not sure about Xen.
> > So I would like to know why you sent this patch.
> >
> >
> > commit ec5b5835a113cf62a168d4a7354564a38de6b52c
> > Author: ken1_ohmichi <ken1_ohmichi>
> > Date:   Fri Oct 9 03:05:41 2009 +0000
> >
> >     [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.
> >
> >     This patch adds the dump filtering for excluding unnecessary pages (cache
> >     pages, user process data pages, and free pages) on on x86_64 xen domain-0.
> >
> >     On the existing makedumpfile (v1.3.3 or former), a user could specify 0
> >     or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
> >     also as a dump_level.
> >
> >     Now, this feature is effective on x86_64 machine only.
> 
> Hmmm... Thanks for this. I missed this patch. However, it looks that I
> do not understand something. AIUI, from Xen point of view we are not able
> to use dump level higher than 1 because there is no e.g. cache pages (it
> looks that we could also skip free pages but this stuff is not implemented).
> Above mentioned patch suggest that there is a way to extract just only Dom0
> stuff taking into account Linux internals only. If my reasoning is true
> then dump level higher than 1 is possible only if we look at Dom0 from Linux
> point of view. 

I've reviewed the code for Xen, my understanding is the same as yours.
The memory regions corresponding to hypervisor and DomU will remain even if
specifying the dump level higher than 1.

> However, I can not find any description how to do that.
> So I am CC-ing Ken'ichi as author of this patch but I do not know that
> he works for NEC still.

I'm sorry but I missed your point. Did you mention a lack of description
in man page about an effect when specifying the dump level higher than 1
for Xen's memory ?
At least, I still think this patch is wrong because any dump level is
effective for x86_64.

BTW, Ken'ichi still work for NEC but he is busy on other projects.


Thanks
Atsushi Kumagai

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-09  2:45       ` Atsushi Kumagai
  2013-12-10 10:39         ` Daniel Kiper
@ 2013-12-10 10:39         ` Daniel Kiper
  1 sibling, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-10 10:39 UTC (permalink / raw)
  To: Atsushi Kumagai
  Cc: Kenichi Oomichi, xen-devel, kexec, david.vrabel, andrew.cooper3

On Mon, Dec 09, 2013 at 02:45:21AM +0000, Atsushi Kumagai wrote:
> On 2013/12/04 4:45:42, kexec <kexec-bounces@lists.infradead.org> wrote:
> > On Tue, Dec 03, 2013 at 05:27:03AM +0000, Atsushi Kumagai wrote:
> > > On 2013/12/02 23:17:59, kexec <kexec-bounces@lists.infradead.org> wrote:
> > > > Do not try to process Xen crash dump on every architecture if dump level
> > > > is invalid. Fail immediately and print relevant error message.
> > > >
> > > > Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> > > > ---
> > > >  makedumpfile.c |    4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/makedumpfile.c b/makedumpfile.c
> > > > index 5a378d1..45f96aa 100644
> > > > --- a/makedumpfile.c
> > > > +++ b/makedumpfile.c
> > > > @@ -7637,14 +7637,14 @@ initial_xen(void)
> > > >  		MSG("Try `makedumpfile --help' for more information.\n");
> > > >  		return FALSE;
> > > >  	}
> > > > -#ifndef __x86_64__
> > > > +
> > > >  	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
> > > >  		MSG("Dump_level is invalid. It should be 0 or 1.\n");
> > > >  		MSG("Commandline parameter is invalid.\n");
> > > >  		MSG("Try `makedumpfile --help' for more information.\n");
> > > >  		return FALSE;
> > > >  	}
> > > > -#endif
> > > > +
> > >
> > > Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
> > > I thought it works by the patch below, but I'm not sure about Xen.
> > > So I would like to know why you sent this patch.
> > >
> > >
> > > commit ec5b5835a113cf62a168d4a7354564a38de6b52c
> > > Author: ken1_ohmichi <ken1_ohmichi>
> > > Date:   Fri Oct 9 03:05:41 2009 +0000
> > >
> > >     [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.
> > >
> > >     This patch adds the dump filtering for excluding unnecessary pages (cache
> > >     pages, user process data pages, and free pages) on on x86_64 xen domain-0.
> > >
> > >     On the existing makedumpfile (v1.3.3 or former), a user could specify 0
> > >     or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
> > >     also as a dump_level.
> > >
> > >     Now, this feature is effective on x86_64 machine only.
> >
> > Hmmm... Thanks for this. I missed this patch. However, it looks that I
> > do not understand something. AIUI, from Xen point of view we are not able
> > to use dump level higher than 1 because there is no e.g. cache pages (it
> > looks that we could also skip free pages but this stuff is not implemented).
> > Above mentioned patch suggest that there is a way to extract just only Dom0
> > stuff taking into account Linux internals only. If my reasoning is true
> > then dump level higher than 1 is possible only if we look at Dom0 from Linux
> > point of view.
>
> I've reviewed the code for Xen, my understanding is the same as yours.
> The memory regions corresponding to hypervisor and DomU will remain even if
> specifying the dump level higher than 1.
>
> > However, I can not find any description how to do that.
> > So I am CC-ing Ken'ichi as author of this patch but I do not know that
> > he works for NEC still.
>
> I'm sorry but I missed your point. Did you mention a lack of description
> in man page about an effect when specifying the dump level higher than 1
> for Xen's memory ?
> At least, I still think this patch is wrong because any dump level is
> effective for x86_64.

Docs are not consistent because man and help displayed from makedumpfile
are different. Additionally, even man says nothing how to use this feature
on Xen vmcore file. If you use makedumpfile e.g.

makedumpfile -Ed 2 /proc/vmcore vmcore

it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO.
I discovered that if you would like to use feature from above mentioned
patch you must run makedumpfile in following way:

makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore

Then makedumpfile will get info about dom0 directly from vmlinux.
However, It looks that there is another bug which prevents usage
of this feature. It looks it is related to change in P2M tree Linux
code. Once P2M levels where changed from 2 to 3. I fixed similar
issue in crash tool once.

When are you going to make a new makedumpfile release? I am going
to fix this issue before next release but now I am quite busy
with other stuff.

Could you apply patches 1, 2 and 4 from this patch series?
It looks that they are not controversial.

Daniel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-09  2:45       ` Atsushi Kumagai
@ 2013-12-10 10:39         ` Daniel Kiper
  2013-12-13  6:59           ` Atsushi Kumagai
  2013-12-13  6:59           ` Atsushi Kumagai
  2013-12-10 10:39         ` Daniel Kiper
  1 sibling, 2 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-10 10:39 UTC (permalink / raw)
  To: Atsushi Kumagai
  Cc: Kenichi Oomichi, xen-devel, kexec, david.vrabel, andrew.cooper3

On Mon, Dec 09, 2013 at 02:45:21AM +0000, Atsushi Kumagai wrote:
> On 2013/12/04 4:45:42, kexec <kexec-bounces@lists.infradead.org> wrote:
> > On Tue, Dec 03, 2013 at 05:27:03AM +0000, Atsushi Kumagai wrote:
> > > On 2013/12/02 23:17:59, kexec <kexec-bounces@lists.infradead.org> wrote:
> > > > Do not try to process Xen crash dump on every architecture if dump level
> > > > is invalid. Fail immediately and print relevant error message.
> > > >
> > > > Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> > > > ---
> > > >  makedumpfile.c |    4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/makedumpfile.c b/makedumpfile.c
> > > > index 5a378d1..45f96aa 100644
> > > > --- a/makedumpfile.c
> > > > +++ b/makedumpfile.c
> > > > @@ -7637,14 +7637,14 @@ initial_xen(void)
> > > >  		MSG("Try `makedumpfile --help' for more information.\n");
> > > >  		return FALSE;
> > > >  	}
> > > > -#ifndef __x86_64__
> > > > +
> > > >  	if (DL_EXCLUDE_ZERO < info->max_dump_level) {
> > > >  		MSG("Dump_level is invalid. It should be 0 or 1.\n");
> > > >  		MSG("Commandline parameter is invalid.\n");
> > > >  		MSG("Try `makedumpfile --help' for more information.\n");
> > > >  		return FALSE;
> > > >  	}
> > > > -#endif
> > > > +
> > >
> > > Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
> > > I thought it works by the patch below, but I'm not sure about Xen.
> > > So I would like to know why you sent this patch.
> > >
> > >
> > > commit ec5b5835a113cf62a168d4a7354564a38de6b52c
> > > Author: ken1_ohmichi <ken1_ohmichi>
> > > Date:   Fri Oct 9 03:05:41 2009 +0000
> > >
> > >     [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.
> > >
> > >     This patch adds the dump filtering for excluding unnecessary pages (cache
> > >     pages, user process data pages, and free pages) on on x86_64 xen domain-0.
> > >
> > >     On the existing makedumpfile (v1.3.3 or former), a user could specify 0
> > >     or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
> > >     also as a dump_level.
> > >
> > >     Now, this feature is effective on x86_64 machine only.
> >
> > Hmmm... Thanks for this. I missed this patch. However, it looks that I
> > do not understand something. AIUI, from Xen point of view we are not able
> > to use dump level higher than 1 because there is no e.g. cache pages (it
> > looks that we could also skip free pages but this stuff is not implemented).
> > Above mentioned patch suggest that there is a way to extract just only Dom0
> > stuff taking into account Linux internals only. If my reasoning is true
> > then dump level higher than 1 is possible only if we look at Dom0 from Linux
> > point of view.
>
> I've reviewed the code for Xen, my understanding is the same as yours.
> The memory regions corresponding to hypervisor and DomU will remain even if
> specifying the dump level higher than 1.
>
> > However, I can not find any description how to do that.
> > So I am CC-ing Ken'ichi as author of this patch but I do not know that
> > he works for NEC still.
>
> I'm sorry but I missed your point. Did you mention a lack of description
> in man page about an effect when specifying the dump level higher than 1
> for Xen's memory ?
> At least, I still think this patch is wrong because any dump level is
> effective for x86_64.

Docs are not consistent because man and help displayed from makedumpfile
are different. Additionally, even man says nothing how to use this feature
on Xen vmcore file. If you use makedumpfile e.g.

makedumpfile -Ed 2 /proc/vmcore vmcore

it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO.
I discovered that if you would like to use feature from above mentioned
patch you must run makedumpfile in following way:

makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore

Then makedumpfile will get info about dom0 directly from vmlinux.
However, It looks that there is another bug which prevents usage
of this feature. It looks it is related to change in P2M tree Linux
code. Once P2M levels where changed from 2 to 3. I fixed similar
issue in crash tool once.

When are you going to make a new makedumpfile release? I am going
to fix this issue before next release but now I am quite busy
with other stuff.

Could you apply patches 1, 2 and 4 from this patch series?
It looks that they are not controversial.

Daniel

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-10 10:39         ` Daniel Kiper
  2013-12-13  6:59           ` Atsushi Kumagai
@ 2013-12-13  6:59           ` Atsushi Kumagai
  1 sibling, 0 replies; 24+ messages in thread
From: Atsushi Kumagai @ 2013-12-13  6:59 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: Kenichi Oomichi, andrew.cooper3, kexec, david.vrabel, xen-devel

On 2013/12/10 19:41:54, kexec <kexec-bounces@lists.infradead.org> wrote:
> > > > Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
> > > > I thought it works by the patch below, but I'm not sure about Xen.
> > > > So I would like to know why you sent this patch.
> > > >
> > > >
> > > > commit ec5b5835a113cf62a168d4a7354564a38de6b52c
> > > > Author: ken1_ohmichi <ken1_ohmichi>
> > > > Date:   Fri Oct 9 03:05:41 2009 +0000
> > > >
> > > >     [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.
> > > >
> > > >     This patch adds the dump filtering for excluding unnecessary pages (cache
> > > >     pages, user process data pages, and free pages) on on x86_64 xen domain-0.
> > > >
> > > >     On the existing makedumpfile (v1.3.3 or former), a user could specify 0
> > > >     or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
> > > >     also as a dump_level.
> > > >
> > > >     Now, this feature is effective on x86_64 machine only.
> > >
> > > Hmmm... Thanks for this. I missed this patch. However, it looks that I
> > > do not understand something. AIUI, from Xen point of view we are not able
> > > to use dump level higher than 1 because there is no e.g. cache pages (it
> > > looks that we could also skip free pages but this stuff is not implemented).
> > > Above mentioned patch suggest that there is a way to extract just only Dom0
> > > stuff taking into account Linux internals only. If my reasoning is true
> > > then dump level higher than 1 is possible only if we look at Dom0 from Linux
> > > point of view.
> >
> > I've reviewed the code for Xen, my understanding is the same as yours.
> > The memory regions corresponding to hypervisor and DomU will remain even if
> > specifying the dump level higher than 1.
> >
> > > However, I can not find any description how to do that.
> > > So I am CC-ing Ken'ichi as author of this patch but I do not know that
> > > he works for NEC still.
> >
> > I'm sorry but I missed your point. Did you mention a lack of description
> > in man page about an effect when specifying the dump level higher than 1
> > for Xen's memory ?
> > At least, I still think this patch is wrong because any dump level is
> > effective for x86_64.
>
> Docs are not consistent because man and help displayed from makedumpfile
> are different. Additionally, even man says nothing how to use this feature
> on Xen vmcore file. If you use makedumpfile e.g.
>
> makedumpfile -Ed 2 /proc/vmcore vmcore
>
> it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO.
> I discovered that if you would like to use feature from above mentioned
> patch you must run makedumpfile in following way:
>
> makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore
>
> Then makedumpfile will get info about dom0 directly from vmlinux.

Certainly the documents should be fixed as you said, I'll do it.

> However, It looks that there is another bug which prevents usage
> of this feature. It looks it is related to change in P2M tree Linux
> code. Once P2M levels where changed from 2 to 3. I fixed similar
> issue in crash tool once.

Thanks for your pointing out, I hope that you will fix that issue
also in makedumpfile.

> When are you going to make a new makedumpfile release? I am going
> to fix this issue before next release but now I am quite busy
> with other stuff.

I must release the new version(v1.5.5) in the next week at the latest
because I announced the release date will be the beginning of December
and there are already many patches for v1.5.5.
So I would like to slip that fix you mentioned to v1.5.6.

> Could you apply patches 1, 2 and 4 from this patch series?
> It looks that they are not controversial.

Sure, the three patches will be merged into v1.5.5.


Thanks
Atsushi Kumagai

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-10 10:39         ` Daniel Kiper
@ 2013-12-13  6:59           ` Atsushi Kumagai
  2013-12-17 20:28             ` Daniel Kiper
                               ` (2 more replies)
  2013-12-13  6:59           ` Atsushi Kumagai
  1 sibling, 3 replies; 24+ messages in thread
From: Atsushi Kumagai @ 2013-12-13  6:59 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: Kenichi Oomichi, andrew.cooper3, kexec, david.vrabel, xen-devel

On 2013/12/10 19:41:54, kexec <kexec-bounces@lists.infradead.org> wrote:
> > > > Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
> > > > I thought it works by the patch below, but I'm not sure about Xen.
> > > > So I would like to know why you sent this patch.
> > > >
> > > >
> > > > commit ec5b5835a113cf62a168d4a7354564a38de6b52c
> > > > Author: ken1_ohmichi <ken1_ohmichi>
> > > > Date:   Fri Oct 9 03:05:41 2009 +0000
> > > >
> > > >     [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.
> > > >
> > > >     This patch adds the dump filtering for excluding unnecessary pages (cache
> > > >     pages, user process data pages, and free pages) on on x86_64 xen domain-0.
> > > >
> > > >     On the existing makedumpfile (v1.3.3 or former), a user could specify 0
> > > >     or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
> > > >     also as a dump_level.
> > > >
> > > >     Now, this feature is effective on x86_64 machine only.
> > >
> > > Hmmm... Thanks for this. I missed this patch. However, it looks that I
> > > do not understand something. AIUI, from Xen point of view we are not able
> > > to use dump level higher than 1 because there is no e.g. cache pages (it
> > > looks that we could also skip free pages but this stuff is not implemented).
> > > Above mentioned patch suggest that there is a way to extract just only Dom0
> > > stuff taking into account Linux internals only. If my reasoning is true
> > > then dump level higher than 1 is possible only if we look at Dom0 from Linux
> > > point of view.
> >
> > I've reviewed the code for Xen, my understanding is the same as yours.
> > The memory regions corresponding to hypervisor and DomU will remain even if
> > specifying the dump level higher than 1.
> >
> > > However, I can not find any description how to do that.
> > > So I am CC-ing Ken'ichi as author of this patch but I do not know that
> > > he works for NEC still.
> >
> > I'm sorry but I missed your point. Did you mention a lack of description
> > in man page about an effect when specifying the dump level higher than 1
> > for Xen's memory ?
> > At least, I still think this patch is wrong because any dump level is
> > effective for x86_64.
>
> Docs are not consistent because man and help displayed from makedumpfile
> are different. Additionally, even man says nothing how to use this feature
> on Xen vmcore file. If you use makedumpfile e.g.
>
> makedumpfile -Ed 2 /proc/vmcore vmcore
>
> it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO.
> I discovered that if you would like to use feature from above mentioned
> patch you must run makedumpfile in following way:
>
> makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore
>
> Then makedumpfile will get info about dom0 directly from vmlinux.

Certainly the documents should be fixed as you said, I'll do it.

> However, It looks that there is another bug which prevents usage
> of this feature. It looks it is related to change in P2M tree Linux
> code. Once P2M levels where changed from 2 to 3. I fixed similar
> issue in crash tool once.

Thanks for your pointing out, I hope that you will fix that issue
also in makedumpfile.

> When are you going to make a new makedumpfile release? I am going
> to fix this issue before next release but now I am quite busy
> with other stuff.

I must release the new version(v1.5.5) in the next week at the latest
because I announced the release date will be the beginning of December
and there are already many patches for v1.5.5.
So I would like to slip that fix you mentioned to v1.5.6.

> Could you apply patches 1, 2 and 4 from this patch series?
> It looks that they are not controversial.

Sure, the three patches will be merged into v1.5.5.


Thanks
Atsushi Kumagai

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

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-13  6:59           ` Atsushi Kumagai
  2013-12-17 20:28             ` Daniel Kiper
@ 2013-12-17 20:28             ` Daniel Kiper
  2014-08-29  6:42             ` Atsushi Kumagai
  2 siblings, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-17 20:28 UTC (permalink / raw)
  To: Atsushi Kumagai
  Cc: Kenichi Oomichi, andrew.cooper3, kexec, david.vrabel, xen-devel

On Fri, Dec 13, 2013 at 06:59:06AM +0000, Atsushi Kumagai wrote:
> On 2013/12/10 19:41:54, kexec <kexec-bounces@lists.infradead.org> wrote:

[...]

> > Docs are not consistent because man and help displayed from makedumpfile
> > are different. Additionally, even man says nothing how to use this feature
> > on Xen vmcore file. If you use makedumpfile e.g.
> >
> > makedumpfile -Ed 2 /proc/vmcore vmcore
> >
> > it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO.
> > I discovered that if you would like to use feature from above mentioned
> > patch you must run makedumpfile in following way:
> >
> > makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore
> >
> > Then makedumpfile will get info about dom0 directly from vmlinux.
>
> Certainly the documents should be fixed as you said, I'll do it.

Thanks.

> > However, It looks that there is another bug which prevents usage
> > of this feature. It looks it is related to change in P2M tree Linux
> > code. Once P2M levels where changed from 2 to 3. I fixed similar
> > issue in crash tool once.
>
> Thanks for your pointing out, I hope that you will fix that issue
> also in makedumpfile.

Yes, I am going to do that but not now. I am just very busy. Additionally,
I have discovered that this feature code is broken in more places because
it was not maintained more than four years. So, to be honest, it is simply
unusable right now.

> > When are you going to make a new makedumpfile release? I am going
> > to fix this issue before next release but now I am quite busy
> > with other stuff.
>
> I must release the new version(v1.5.5) in the next week at the latest
> because I announced the release date will be the beginning of December
> and there are already many patches for v1.5.5.
> So I would like to slip that fix you mentioned to v1.5.6.

OK.

> > Could you apply patches 1, 2 and 4 from this patch series?
> > It looks that they are not controversial.
>
> Sure, the three patches will be merged into v1.5.5.

Thanks.

Daniel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-13  6:59           ` Atsushi Kumagai
@ 2013-12-17 20:28             ` Daniel Kiper
  2013-12-17 20:28             ` Daniel Kiper
  2014-08-29  6:42             ` Atsushi Kumagai
  2 siblings, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-17 20:28 UTC (permalink / raw)
  To: Atsushi Kumagai
  Cc: Kenichi Oomichi, andrew.cooper3, kexec, david.vrabel, xen-devel

On Fri, Dec 13, 2013 at 06:59:06AM +0000, Atsushi Kumagai wrote:
> On 2013/12/10 19:41:54, kexec <kexec-bounces@lists.infradead.org> wrote:

[...]

> > Docs are not consistent because man and help displayed from makedumpfile
> > are different. Additionally, even man says nothing how to use this feature
> > on Xen vmcore file. If you use makedumpfile e.g.
> >
> > makedumpfile -Ed 2 /proc/vmcore vmcore
> >
> > it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO.
> > I discovered that if you would like to use feature from above mentioned
> > patch you must run makedumpfile in following way:
> >
> > makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore
> >
> > Then makedumpfile will get info about dom0 directly from vmlinux.
>
> Certainly the documents should be fixed as you said, I'll do it.

Thanks.

> > However, It looks that there is another bug which prevents usage
> > of this feature. It looks it is related to change in P2M tree Linux
> > code. Once P2M levels where changed from 2 to 3. I fixed similar
> > issue in crash tool once.
>
> Thanks for your pointing out, I hope that you will fix that issue
> also in makedumpfile.

Yes, I am going to do that but not now. I am just very busy. Additionally,
I have discovered that this feature code is broken in more places because
it was not maintained more than four years. So, to be honest, it is simply
unusable right now.

> > When are you going to make a new makedumpfile release? I am going
> > to fix this issue before next release but now I am quite busy
> > with other stuff.
>
> I must release the new version(v1.5.5) in the next week at the latest
> because I announced the release date will be the beginning of December
> and there are already many patches for v1.5.5.
> So I would like to slip that fix you mentioned to v1.5.6.

OK.

> > Could you apply patches 1, 2 and 4 from this patch series?
> > It looks that they are not controversial.
>
> Sure, the three patches will be merged into v1.5.5.

Thanks.

Daniel

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2013-12-13  6:59           ` Atsushi Kumagai
  2013-12-17 20:28             ` Daniel Kiper
  2013-12-17 20:28             ` Daniel Kiper
@ 2014-08-29  6:42             ` Atsushi Kumagai
  2014-09-01 21:30               ` Daniel Kiper
  2 siblings, 1 reply; 24+ messages in thread
From: Atsushi Kumagai @ 2014-08-29  6:42 UTC (permalink / raw)
  To: daniel.kiper; +Cc: kexec

Hello Daniel,	

>On 2013/12/10 19:41:54, kexec <kexec-bounces@lists.infradead.org> wrote:
>> > > > Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
>> > > > I thought it works by the patch below, but I'm not sure about Xen.
>> > > > So I would like to know why you sent this patch.
>> > > >
>> > > >
>> > > > commit ec5b5835a113cf62a168d4a7354564a38de6b52c
>> > > > Author: ken1_ohmichi <ken1_ohmichi>
>> > > > Date:   Fri Oct 9 03:05:41 2009 +0000
>> > > >
>> > > >     [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.
>> > > >
>> > > >     This patch adds the dump filtering for excluding unnecessary pages (cache
>> > > >     pages, user process data pages, and free pages) on on x86_64 xen domain-0.
>> > > >
>> > > >     On the existing makedumpfile (v1.3.3 or former), a user could specify 0
>> > > >     or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
>> > > >     also as a dump_level.
>> > > >
>> > > >     Now, this feature is effective on x86_64 machine only.
>> > >
>> > > Hmmm... Thanks for this. I missed this patch. However, it looks that I
>> > > do not understand something. AIUI, from Xen point of view we are not able
>> > > to use dump level higher than 1 because there is no e.g. cache pages (it
>> > > looks that we could also skip free pages but this stuff is not implemented).
>> > > Above mentioned patch suggest that there is a way to extract just only Dom0
>> > > stuff taking into account Linux internals only. If my reasoning is true
>> > > then dump level higher than 1 is possible only if we look at Dom0 from Linux
>> > > point of view.
>> >
>> > I've reviewed the code for Xen, my understanding is the same as yours.
>> > The memory regions corresponding to hypervisor and DomU will remain even if
>> > specifying the dump level higher than 1.
>> >
>> > > However, I can not find any description how to do that.
>> > > So I am CC-ing Ken'ichi as author of this patch but I do not know that
>> > > he works for NEC still.
>> >
>> > I'm sorry but I missed your point. Did you mention a lack of description
>> > in man page about an effect when specifying the dump level higher than 1
>> > for Xen's memory ?
>> > At least, I still think this patch is wrong because any dump level is
>> > effective for x86_64.
>>
>> Docs are not consistent because man and help displayed from makedumpfile
>> are different. Additionally, even man says nothing how to use this feature
>> on Xen vmcore file. If you use makedumpfile e.g.
>>
>> makedumpfile -Ed 2 /proc/vmcore vmcore
>>
>> it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO.
>> I discovered that if you would like to use feature from above mentioned
>> patch you must run makedumpfile in following way:
>>
>> makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore
>>
>> Then makedumpfile will get info about dom0 directly from vmlinux.
>
>Certainly the documents should be fixed as you said, I'll do it.

Sorry for my too late job, how about this fix ?
I'll merge it into v1.5.7 if you have no objection.


Thanks
Atsushi Kumagai

From: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date: Fri, 29 Aug 2014 15:11:27 +0900
Subject: [PATCH] Fix description about filtering for Xen.

Correct the following points for Xen dump:

  - Add how to filter the pages of domain-0.
  - Fix the difference between man and help.

Reported-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
---
 makedumpfile.8 | 5 +++--
 print_info.c   | 5 ++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/makedumpfile.8 b/makedumpfile.8
index 25fe74e..0f51bf2 100644
--- a/makedumpfile.8
+++ b/makedumpfile.8
@@ -150,8 +150,9 @@ Pages of the specified type are not copied to \fIDUMPFILE\fR. The page type
 marked in the following table is excluded. A user can specify multiple page
 types by setting the sum of each page type for dump_level. The maximum of
 dump_level is 31. Note that a dump_level for Xen dump filtering is 0 or 1 on
-a machine other than x86_64 (On an x86_64 machine, it is possible to specify
-2 or bigger as a dump_level).
+a machine other than x86_64. On a x86_64 machine, even 2 or bigger dump level
+will be effective if you specify domain-0's \fIvmlinux\fR with \-x option.
+Then the pages are excluded only from domain-0.
 .br
 If specifying multiple dump_levels with the delimiter ',', makedumpfile retries
 to create a \fIDUMPFILE\fR by other dump_level when "No space on device" error
diff --git a/print_info.c b/print_info.c
index 7592690..1fca7c3 100644
--- a/print_info.c
+++ b/print_info.c
@@ -89,6 +89,9 @@ print_usage(void)
 	MSG("  Creating DUMPFILE of Xen:\n");
 	MSG("  # makedumpfile -E [--xen-syms XEN-SYMS|--xen-vmcoreinfo VMCOREINFO] VMCORE DUMPFILE\n");
 	MSG("\n");
+	MSG("  Filtering domain-0 of Xen:\n");
+	MSG("  # makedumpfile -E -d DL -x vmlinux VMCORE DUMPFILE\n");
+	MSG("\n");
 	MSG("  Generating VMCOREINFO of Xen:\n");
 	MSG("  # makedumpfile -g VMCOREINFO --xen-syms XEN-SYMS\n");
 	MSG("\n");
@@ -111,7 +114,7 @@ print_usage(void)
 	MSG("      marked in the following table is excluded. A user can specify multiple\n");
 	MSG("      page types by setting the sum of each page type for Dump_Level (DL).\n");
 	MSG("      The maximum of Dump_Level is 31.\n");
-	MSG("      Note that Dump_Level for Xen dump filtering is 0 or 1.\n");
+	MSG("      Note that Dump_Level for Xen dump filtering is 0 or 1 except on x86_64\n");
 	MSG("\n");
 	MSG("            |         cache    cache\n");
 	MSG("      Dump  |  zero   without  with     user    free\n");
-- 
1.9.0

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

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid
  2014-08-29  6:42             ` Atsushi Kumagai
@ 2014-09-01 21:30               ` Daniel Kiper
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2014-09-01 21:30 UTC (permalink / raw)
  To: Atsushi Kumagai; +Cc: kexec

On Fri, Aug 29, 2014 at 06:42:18AM +0000, Atsushi Kumagai wrote:
> Hello Daniel,
>
> >On 2013/12/10 19:41:54, kexec <kexec-bounces@lists.infradead.org> wrote:
> >> > > > Did you say that dump level 2 or larger are no longer effective even for x86_64 ?
> >> > > > I thought it works by the patch below, but I'm not sure about Xen.
> >> > > > So I would like to know why you sent this patch.
> >> > > >
> >> > > >
> >> > > > commit ec5b5835a113cf62a168d4a7354564a38de6b52c
> >> > > > Author: ken1_ohmichi <ken1_ohmichi>
> >> > > > Date:   Fri Oct 9 03:05:41 2009 +0000
> >> > > >
> >> > > >     [v1.3.4-10] Add dump filtering on an x86_64 xen domain-0.
> >> > > >
> >> > > >     This patch adds the dump filtering for excluding unnecessary pages (cache
> >> > > >     pages, user process data pages, and free pages) on on x86_64 xen domain-0.
> >> > > >
> >> > > >     On the existing makedumpfile (v1.3.3 or former), a user could specify 0
> >> > > >     or 1 only as a dump_level. By this patch, he/she can specify 2 or larger
> >> > > >     also as a dump_level.
> >> > > >
> >> > > >     Now, this feature is effective on x86_64 machine only.
> >> > >
> >> > > Hmmm... Thanks for this. I missed this patch. However, it looks that I
> >> > > do not understand something. AIUI, from Xen point of view we are not able
> >> > > to use dump level higher than 1 because there is no e.g. cache pages (it
> >> > > looks that we could also skip free pages but this stuff is not implemented).
> >> > > Above mentioned patch suggest that there is a way to extract just only Dom0
> >> > > stuff taking into account Linux internals only. If my reasoning is true
> >> > > then dump level higher than 1 is possible only if we look at Dom0 from Linux
> >> > > point of view.
> >> >
> >> > I've reviewed the code for Xen, my understanding is the same as yours.
> >> > The memory regions corresponding to hypervisor and DomU will remain even if
> >> > specifying the dump level higher than 1.
> >> >
> >> > > However, I can not find any description how to do that.
> >> > > So I am CC-ing Ken'ichi as author of this patch but I do not know that
> >> > > he works for NEC still.
> >> >
> >> > I'm sorry but I missed your point. Did you mention a lack of description
> >> > in man page about an effect when specifying the dump level higher than 1
> >> > for Xen's memory ?
> >> > At least, I still think this patch is wrong because any dump level is
> >> > effective for x86_64.
> >>
> >> Docs are not consistent because man and help displayed from makedumpfile
> >> are different. Additionally, even man says nothing how to use this feature
> >> on Xen vmcore file. If you use makedumpfile e.g.
> >>
> >> makedumpfile -Ed 2 /proc/vmcore vmcore
> >>
> >> it will not work because it uses VMCOREINFO_XEN instead of VMCOREINFO.
> >> I discovered that if you would like to use feature from above mentioned
> >> patch you must run makedumpfile in following way:
> >>
> >> makedumpfile -Ed 2 -x vmlinux /proc/vmcore vmcore
> >>
> >> Then makedumpfile will get info about dom0 directly from vmlinux.
> >
> >Certainly the documents should be fixed as you said, I'll do it.
>
> Sorry for my too late job, how about this fix ?

No problem. I am busy too. I still have patch fixing this
feature for new Xen versions on my long todo list. I hope that
I will be able to work on it at the beginning of next year.

> I'll merge it into v1.5.7 if you have no objection.

Great! Thanks!

> Thanks
> Atsushi Kumagai
>
> From: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
> Date: Fri, 29 Aug 2014 15:11:27 +0900
> Subject: [PATCH] Fix description about filtering for Xen.
>
> Correct the following points for Xen dump:
>
>   - Add how to filter the pages of domain-0.
>   - Fix the difference between man and help.
>
> Reported-by: Daniel Kiper <daniel.kiper@oracle.com>
> Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Daniel

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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups
@ 2013-12-02 14:16 Daniel Kiper
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel Kiper @ 2013-12-02 14:16 UTC (permalink / raw)
  To: andrew.cooper3, david.vrabel, kumagai-atsushi, kexec, xen-devel

Hi,

This is second version of patch series containing following
makedumpfile Xen fixes and cleanups:
  - makedumpfile/xen: Add cache_init() call to initial_xen(),
  - makedumpfile/xen: Disable cyclic mode for every Xen crash dump,
  - makedumpfile/xen: Fail immediately on every architecture if dump level is invalid,
  - makedumpfile/xen: Move cyclic mode check from initial() to initial_xen().

All patches were tested with Xen versions up to latest unstable.

Please apply.

Daniel

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-09-01 21:31 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-02 14:16 [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups Daniel Kiper
2013-12-02 14:16 ` [PATCH v2 1/4] makedumpfile/xen: Add cache_init() call to initial_xen() Daniel Kiper
2013-12-02 14:16 ` Daniel Kiper
2013-12-02 14:16 ` [PATCH v2 2/4] makedumpfile/xen: Disable cyclic mode for every Xen crash dump Daniel Kiper
2013-12-02 14:16 ` Daniel Kiper
2013-12-02 14:16 ` [PATCH v2 3/4] makedumpfile/xen: Fail immediately on every architecture if dump level is invalid Daniel Kiper
2013-12-03  5:27   ` Atsushi Kumagai
2013-12-03 19:45     ` Daniel Kiper
2013-12-03 19:45     ` Daniel Kiper
2013-12-09  2:45       ` Atsushi Kumagai
2013-12-09  2:45       ` Atsushi Kumagai
2013-12-10 10:39         ` Daniel Kiper
2013-12-13  6:59           ` Atsushi Kumagai
2013-12-17 20:28             ` Daniel Kiper
2013-12-17 20:28             ` Daniel Kiper
2014-08-29  6:42             ` Atsushi Kumagai
2014-09-01 21:30               ` Daniel Kiper
2013-12-13  6:59           ` Atsushi Kumagai
2013-12-10 10:39         ` Daniel Kiper
2013-12-03  5:27   ` Atsushi Kumagai
2013-12-02 14:16 ` Daniel Kiper
2013-12-02 14:16 ` [PATCH v2 4/4] makedumpfile/xen: Move cyclic mode check from initial() to initial_xen() Daniel Kiper
2013-12-02 14:16 ` Daniel Kiper
  -- strict thread matches above, loose matches on Subject: below --
2013-12-02 14:16 [PATCH v2 0/4] makedumpfile: Xen fixes and cleanups Daniel Kiper

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.