public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] Rename vmcoreinfo's macros returning the size
       [not found] <473CFE14.3010400@mxs.nes.nec.co.jp>
@ 2007-11-16  2:33 ` Ken'ichi Ohmichi
  2007-11-16 18:26   ` Simon Horman
  2007-11-16  2:33 ` [PATCH 2/5] Use the existing offsetof() for VMCOREINFO_OFFSET() Ken'ichi Ohmichi
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Ken'ichi Ohmichi @ 2007-11-16  2:33 UTC (permalink / raw)
  To: lkml, kexec-ml


VMCOREINFO_SIZE() should be renamed VMCOREINFO_STRUCT_SIZE() since it's always
returning the size of the struct with a given name. This change would allow
VMCOREINFO_TYPEDEF_SIZE() to simply become VMCOREINFO_SIZE() since it need not
be used exclusively for typedefs.

This discussion is the following:
http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0582.html

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Acked-by: David Rientjes <rientjes@google.com>
---
diff -rpuN a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c
--- a/arch/ia64/kernel/machine_kexec.c	2007-11-14 15:50:10.000000000 +0900
+++ b/arch/ia64/kernel/machine_kexec.c	2007-11-14 15:50:36.000000000 +0900
@@ -135,7 +135,7 @@ void arch_crash_save_vmcoreinfo(void)
 
 	VMCOREINFO_SYMBOL(node_memblk);
 	VMCOREINFO_LENGTH(node_memblk, NR_NODE_MEMBLKS);
-	VMCOREINFO_SIZE(node_memblk_s);
+	VMCOREINFO_STRUCT_SIZE(node_memblk_s);
 	VMCOREINFO_OFFSET(node_memblk_s, start_paddr);
 	VMCOREINFO_OFFSET(node_memblk_s, size);
 #endif
diff -rpuN a/include/linux/kexec.h b/include/linux/kexec.h
--- a/include/linux/kexec.h	2007-11-14 15:50:09.000000000 +0900
+++ b/include/linux/kexec.h	2007-11-14 15:50:36.000000000 +0900
@@ -131,10 +131,10 @@ unsigned long paddr_vmcoreinfo_note(void
 	vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&name)
 #define VMCOREINFO_SIZE(name) \
 	vmcoreinfo_append_str("SIZE(%s)=%lu\n", #name, \
-			      (unsigned long)sizeof(struct name))
-#define VMCOREINFO_TYPEDEF_SIZE(name) \
-	vmcoreinfo_append_str("SIZE(%s)=%lu\n", #name, \
 			      (unsigned long)sizeof(name))
+#define VMCOREINFO_STRUCT_SIZE(name) \
+	vmcoreinfo_append_str("SIZE(%s)=%lu\n", #name, \
+			      (unsigned long)sizeof(struct name))
 #define VMCOREINFO_OFFSET(name, field) \
 	vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \
 			      (unsigned long)&(((struct name *)0)->field))
diff -rpuN a/kernel/kexec.c b/kernel/kexec.c
--- a/kernel/kexec.c	2007-11-14 15:50:09.000000000 +0900
+++ b/kernel/kexec.c	2007-11-14 15:50:36.000000000 +0900
@@ -1376,15 +1376,15 @@ static int __init crash_save_vmcoreinfo_
 #ifdef CONFIG_SPARSEMEM
 	VMCOREINFO_SYMBOL(mem_section);
 	VMCOREINFO_LENGTH(mem_section, NR_SECTION_ROOTS);
-	VMCOREINFO_SIZE(mem_section);
+	VMCOREINFO_STRUCT_SIZE(mem_section);
 	VMCOREINFO_OFFSET(mem_section, section_mem_map);
 #endif
-	VMCOREINFO_SIZE(page);
-	VMCOREINFO_SIZE(pglist_data);
-	VMCOREINFO_SIZE(zone);
-	VMCOREINFO_SIZE(free_area);
-	VMCOREINFO_SIZE(list_head);
-	VMCOREINFO_TYPEDEF_SIZE(nodemask_t);
+	VMCOREINFO_STRUCT_SIZE(page);
+	VMCOREINFO_STRUCT_SIZE(pglist_data);
+	VMCOREINFO_STRUCT_SIZE(zone);
+	VMCOREINFO_STRUCT_SIZE(free_area);
+	VMCOREINFO_STRUCT_SIZE(list_head);
+	VMCOREINFO_SIZE(nodemask_t);
 	VMCOREINFO_OFFSET(page, flags);
 	VMCOREINFO_OFFSET(page, _count);
 	VMCOREINFO_OFFSET(page, mapping);
_


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

* [PATCH 2/5] Use the existing offsetof() for VMCOREINFO_OFFSET()
       [not found] <473CFE14.3010400@mxs.nes.nec.co.jp>
  2007-11-16  2:33 ` [PATCH 1/5] Rename vmcoreinfo's macros returning the size Ken'ichi Ohmichi
@ 2007-11-16  2:33 ` Ken'ichi Ohmichi
  2007-11-16 18:54   ` Simon Horman
  2007-11-16  2:33 ` [PATCH 3/5] Add "VMCOREINFO_" to all the call for vmcoreinfo_append_str() Ken'ichi Ohmichi
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Ken'ichi Ohmichi @ 2007-11-16  2:33 UTC (permalink / raw)
  To: lkml, kexec-ml


It is better that the existing offsetof() is used for VMCOREINFO_OFFSET().

This discussion is the following:
http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0584.html

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
---
diff -rpuN a/include/linux/kexec.h b/include/linux/kexec.h
--- a/include/linux/kexec.h	2007-11-12 11:03:31.000000000 +0900
+++ b/include/linux/kexec.h	2007-11-12 11:03:43.000000000 +0900
@@ -137,7 +137,7 @@ unsigned long paddr_vmcoreinfo_note(void
 			      (unsigned long)sizeof(struct name))
 #define VMCOREINFO_OFFSET(name, field) \
 	vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \
-			      (unsigned long)&(((struct name *)0)->field))
+			      (unsigned long)offsetof(struct name, field))
 #define VMCOREINFO_LENGTH(name, value) \
 	vmcoreinfo_append_str("LENGTH(%s)=%lu\n", #name, (unsigned long)value)
 #define VMCOREINFO_NUMBER(name) \
_


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

* [PATCH 3/5] Add "VMCOREINFO_" to all the call for vmcoreinfo_append_str()
       [not found] <473CFE14.3010400@mxs.nes.nec.co.jp>
  2007-11-16  2:33 ` [PATCH 1/5] Rename vmcoreinfo's macros returning the size Ken'ichi Ohmichi
  2007-11-16  2:33 ` [PATCH 2/5] Use the existing offsetof() for VMCOREINFO_OFFSET() Ken'ichi Ohmichi
@ 2007-11-16  2:33 ` Ken'ichi Ohmichi
  2007-11-16 18:55   ` Simon Horman
  2007-11-16  2:33 ` [PATCH 4/5] Fix the configuration dependencies Ken'ichi Ohmichi
  2007-11-16  2:33 ` [PATCH 5/5] Add the array length of "free_list" for filtering free pages Ken'ichi Ohmichi
  4 siblings, 1 reply; 14+ messages in thread
From: Ken'ichi Ohmichi @ 2007-11-16  2:33 UTC (permalink / raw)
  To: lkml, kexec-ml


For readability, all the calls to vmcoreinfo_append_str() are changed to macros
having a prefix "VMCOREINFO_".

This discussion is the following:
http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0584.html

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
---
diff -rpuN a/include/linux/kexec.h b/include/linux/kexec.h
--- a/include/linux/kexec.h	2007-11-12 11:04:09.000000000 +0900
+++ b/include/linux/kexec.h	2007-11-12 11:04:22.000000000 +0900
@@ -127,6 +127,10 @@ void vmcoreinfo_append_str(const char *f
 	__attribute__ ((format (printf, 1, 2)));
 unsigned long paddr_vmcoreinfo_note(void);
 
+#define VMCOREINFO_OSRELEASE(name) \
+	vmcoreinfo_append_str("OSRELEASE=%s\n", #name)
+#define VMCOREINFO_PAGESIZE(value) \
+	vmcoreinfo_append_str("PAGESIZE=%ld\n", value)
 #define VMCOREINFO_SYMBOL(name) \
 	vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&name)
 #define VMCOREINFO_SIZE(name) \
diff -rpuN a/kernel/kexec.c b/kernel/kexec.c
--- a/kernel/kexec.c	2007-11-12 11:04:11.000000000 +0900
+++ b/kernel/kexec.c	2007-11-12 11:04:22.000000000 +0900
@@ -1361,8 +1361,8 @@ unsigned long __attribute__ ((weak)) pad
 
 static int __init crash_save_vmcoreinfo_init(void)
 {
-	vmcoreinfo_append_str("OSRELEASE=%s\n", init_uts_ns.name.release);
-	vmcoreinfo_append_str("PAGESIZE=%ld\n", PAGE_SIZE);
+	VMCOREINFO_OSRELEASE(init_uts_ns.name.release);
+	VMCOREINFO_PAGESIZE(PAGE_SIZE);
 
 	VMCOREINFO_SYMBOL(init_uts_ns);
 	VMCOREINFO_SYMBOL(node_online_map);
_



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

* [PATCH 4/5] Fix the configuration dependencies
       [not found] <473CFE14.3010400@mxs.nes.nec.co.jp>
                   ` (2 preceding siblings ...)
  2007-11-16  2:33 ` [PATCH 3/5] Add "VMCOREINFO_" to all the call for vmcoreinfo_append_str() Ken'ichi Ohmichi
@ 2007-11-16  2:33 ` Ken'ichi Ohmichi
  2007-11-16 16:25   ` Simon Horman
  2007-11-26  7:58   ` Andrew Morton
  2007-11-16  2:33 ` [PATCH 5/5] Add the array length of "free_list" for filtering free pages Ken'ichi Ohmichi
  4 siblings, 2 replies; 14+ messages in thread
From: Ken'ichi Ohmichi @ 2007-11-16  2:33 UTC (permalink / raw)
  To: lkml, kexec-ml


This patch fixes the configuration dependencies in the vmcoreinfo data.

i386's "node_data" is defined in arch/x86/mm/discontig_32.c,
and x86_64's one is defined in arch/x86/mm/numa_64.c.
They depend on CONFIG_NUMA:
  arch/x86/mm/Makefile_32:7
    obj-$(CONFIG_NUMA) += discontig_32.o
  arch/x86/mm/Makefile_64:7
    obj-$(CONFIG_NUMA) += numa_64.o

ia64's "pgdat_list" is defined in arch/ia64/mm/discontig.c,
and it depends on CONFIG_DISCONTIGMEM and CONFIG_SPARSEMEM:
  arch/ia64/mm/Makefile:9-10
    obj-$(CONFIG_DISCONTIGMEM) += discontig.o
    obj-$(CONFIG_SPARSEMEM)    += discontig.o

ia64's "node_memblk" is defined in arch/ia64/mm/numa.c,
and it depends on CONFIG_NUMA:
  arch/ia64/mm/Makefile:8
    obj-$(CONFIG_NUMA)         += numa.o

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
---
diff -rpuN a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c
--- a/arch/ia64/kernel/machine_kexec.c	2007-11-14 15:39:06.000000000 +0900
+++ b/arch/ia64/kernel/machine_kexec.c	2007-11-14 15:41:41.000000000 +0900
@@ -129,10 +129,11 @@ void machine_kexec(struct kimage *image)
 
 void arch_crash_save_vmcoreinfo(void)
 {
-#if defined(CONFIG_ARCH_DISCONTIGMEM_ENABLE) && defined(CONFIG_NUMA)
+#if defined(CONFIG_DISCONTIGMEM) || defined(CONFIG_SPARSEMEM)
 	VMCOREINFO_SYMBOL(pgdat_list);
 	VMCOREINFO_LENGTH(pgdat_list, MAX_NUMNODES);
-
+#endif
+#ifdef CONFIG_NUMA
 	VMCOREINFO_SYMBOL(node_memblk);
 	VMCOREINFO_LENGTH(node_memblk, NR_NODE_MEMBLKS);
 	VMCOREINFO_STRUCT_SIZE(node_memblk_s);
diff -rpuN a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
--- a/arch/x86/kernel/machine_kexec_32.c	2007-11-14 15:39:19.000000000 +0900
+++ b/arch/x86/kernel/machine_kexec_32.c	2007-11-14 15:39:33.000000000 +0900
@@ -151,7 +151,7 @@ NORET_TYPE void machine_kexec(struct kim
 
 void arch_crash_save_vmcoreinfo(void)
 {
-#ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE
+#ifdef CONFIG_NUMA
 	VMCOREINFO_SYMBOL(node_data);
 	VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
 #endif
diff -rpuN a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
--- a/arch/x86/kernel/machine_kexec_64.c	2007-11-14 15:39:19.000000000 +0900
+++ b/arch/x86/kernel/machine_kexec_64.c	2007-11-14 15:39:33.000000000 +0900
@@ -235,7 +235,7 @@ void arch_crash_save_vmcoreinfo(void)
 {
 	VMCOREINFO_SYMBOL(init_level4_pgt);
 
-#ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE
+#ifdef CONFIG_NUMA
 	VMCOREINFO_SYMBOL(node_data);
 	VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
 #endif
_



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

* [PATCH 5/5] Add the array length of "free_list" for filtering free pages
       [not found] <473CFE14.3010400@mxs.nes.nec.co.jp>
                   ` (3 preceding siblings ...)
  2007-11-16  2:33 ` [PATCH 4/5] Fix the configuration dependencies Ken'ichi Ohmichi
@ 2007-11-16  2:33 ` Ken'ichi Ohmichi
  2007-11-16 19:16   ` Simon Horman
  4 siblings, 1 reply; 14+ messages in thread
From: Ken'ichi Ohmichi @ 2007-11-16  2:33 UTC (permalink / raw)
  To: lkml, kexec-ml


This patch adds the array length of "free_area.free_list" to the vmcoreinfo
data so that makedumpfile (dump filtering command) can exclude all free pages
in linux-2.6.24.

makedumpfile creates a small dumpfile by excluding unnecessary pages for the
analysis. To distinguish unnecessary pages, makedumpfile gets the vmcoreinfo
data which has the minimum debugging information only for dump filtering.

In 2.6.24-rc1 or later, the free_area.free_list is an array which has one list
for each migrate types instead of a single list. makedumpfile needs the array
length of "free_area.free_list" and the vmcoreinfo data should contain it.


Signed-off-by: Huang Ying <ying.huang@intel.com>
Tested-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
---
diff -rpuN a/kernel/kexec.c b/kernel/kexec.c
--- a/kernel/kexec.c	2007-11-12 11:15:26.000000000 +0900
+++ b/kernel/kexec.c	2007-11-12 11:16:09.000000000 +0900
@@ -1404,6 +1404,7 @@ static int __init crash_save_vmcoreinfo_
 	VMCOREINFO_OFFSET(list_head, next);
 	VMCOREINFO_OFFSET(list_head, prev);
 	VMCOREINFO_LENGTH(zone.free_area, MAX_ORDER);
+	VMCOREINFO_LENGTH(free_area.free_list, MIGRATE_TYPES);
 	VMCOREINFO_NUMBER(NR_FREE_PAGES);
 
 	arch_crash_save_vmcoreinfo();
_


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

* Re: [PATCH 4/5] Fix the configuration dependencies
  2007-11-16  2:33 ` [PATCH 4/5] Fix the configuration dependencies Ken'ichi Ohmichi
@ 2007-11-16 16:25   ` Simon Horman
  2007-11-21  2:50     ` Ken'ichi Ohmichi
  2007-11-26  7:58   ` Andrew Morton
  1 sibling, 1 reply; 14+ messages in thread
From: Simon Horman @ 2007-11-16 16:25 UTC (permalink / raw)
  To: Ken'ichi Ohmichi; +Cc: lkml, kexec-ml

On Fri, Nov 16, 2007 at 11:33:20AM +0900, Ken'ichi Ohmichi wrote:
> 
> This patch fixes the configuration dependencies in the vmcoreinfo data.
> 
> i386's "node_data" is defined in arch/x86/mm/discontig_32.c,
> and x86_64's one is defined in arch/x86/mm/numa_64.c.
> They depend on CONFIG_NUMA:
>   arch/x86/mm/Makefile_32:7
>     obj-$(CONFIG_NUMA) += discontig_32.o
>   arch/x86/mm/Makefile_64:7
>     obj-$(CONFIG_NUMA) += numa_64.o
> 
> ia64's "pgdat_list" is defined in arch/ia64/mm/discontig.c,
> and it depends on CONFIG_DISCONTIGMEM and CONFIG_SPARSEMEM:
>   arch/ia64/mm/Makefile:9-10
>     obj-$(CONFIG_DISCONTIGMEM) += discontig.o
>     obj-$(CONFIG_SPARSEMEM)    += discontig.o
> 
> ia64's "node_memblk" is defined in arch/ia64/mm/numa.c,
> and it depends on CONFIG_NUMA:
>   arch/ia64/mm/Makefile:8
>     obj-$(CONFIG_NUMA)         += numa.o
> 
> Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>

This appears correct to me, checking through the symbols and the
location of their deffinitions, though I have not had a chance to run
many build checks.

I also note that CONFIG_ARCH_DISCONTIGMEM_ENABLE does not even
appear to exist on i386, so it looks that without this change
the code in question whould never be enabled.

Acked-by: Simon Horman <horms@verge.net.au>

> ---
> diff -rpuN a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c
> --- a/arch/ia64/kernel/machine_kexec.c	2007-11-14 15:39:06.000000000 +0900
> +++ b/arch/ia64/kernel/machine_kexec.c	2007-11-14 15:41:41.000000000 +0900
> @@ -129,10 +129,11 @@ void machine_kexec(struct kimage *image)
>  
>  void arch_crash_save_vmcoreinfo(void)
>  {
> -#if defined(CONFIG_ARCH_DISCONTIGMEM_ENABLE) && defined(CONFIG_NUMA)
> +#if defined(CONFIG_DISCONTIGMEM) || defined(CONFIG_SPARSEMEM)
>  	VMCOREINFO_SYMBOL(pgdat_list);
>  	VMCOREINFO_LENGTH(pgdat_list, MAX_NUMNODES);
> -
> +#endif
> +#ifdef CONFIG_NUMA
>  	VMCOREINFO_SYMBOL(node_memblk);
>  	VMCOREINFO_LENGTH(node_memblk, NR_NODE_MEMBLKS);
>  	VMCOREINFO_STRUCT_SIZE(node_memblk_s);
> diff -rpuN a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
> --- a/arch/x86/kernel/machine_kexec_32.c	2007-11-14 15:39:19.000000000 +0900
> +++ b/arch/x86/kernel/machine_kexec_32.c	2007-11-14 15:39:33.000000000 +0900
> @@ -151,7 +151,7 @@ NORET_TYPE void machine_kexec(struct kim
>  
>  void arch_crash_save_vmcoreinfo(void)
>  {
> -#ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE
> +#ifdef CONFIG_NUMA
>  	VMCOREINFO_SYMBOL(node_data);
>  	VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
>  #endif
> diff -rpuN a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
> --- a/arch/x86/kernel/machine_kexec_64.c	2007-11-14 15:39:19.000000000 +0900
> +++ b/arch/x86/kernel/machine_kexec_64.c	2007-11-14 15:39:33.000000000 +0900
> @@ -235,7 +235,7 @@ void arch_crash_save_vmcoreinfo(void)
>  {
>  	VMCOREINFO_SYMBOL(init_level4_pgt);
>  
> -#ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE
> +#ifdef CONFIG_NUMA
>  	VMCOREINFO_SYMBOL(node_data);
>  	VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
>  #endif
> _
> 
> 
> 

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


-- 
宝曼 西門 (ホウマン・サイモン) | Simon Horman (Horms)

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

* Re: [PATCH 1/5] Rename vmcoreinfo's macros returning the size
  2007-11-16  2:33 ` [PATCH 1/5] Rename vmcoreinfo's macros returning the size Ken'ichi Ohmichi
@ 2007-11-16 18:26   ` Simon Horman
  0 siblings, 0 replies; 14+ messages in thread
From: Simon Horman @ 2007-11-16 18:26 UTC (permalink / raw)
  To: Ken'ichi Ohmichi; +Cc: lkml, kexec-ml

On Fri, Nov 16, 2007 at 11:33:02AM +0900, Ken'ichi Ohmichi wrote:
> 
> VMCOREINFO_SIZE() should be renamed VMCOREINFO_STRUCT_SIZE() since it's always
> returning the size of the struct with a given name. This change would allow
> VMCOREINFO_TYPEDEF_SIZE() to simply become VMCOREINFO_SIZE() since it need not
> be used exclusively for typedefs.
> 
> This discussion is the following:
> http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0582.html
> 
> Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
> Acked-by: David Rientjes <rientjes@google.com>

As far as name changes go, this one looks good to me.

Acked-by: Simon Horman <horms@verge.net.au>

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

* Re: [PATCH 2/5] Use the existing offsetof() for VMCOREINFO_OFFSET()
  2007-11-16  2:33 ` [PATCH 2/5] Use the existing offsetof() for VMCOREINFO_OFFSET() Ken'ichi Ohmichi
@ 2007-11-16 18:54   ` Simon Horman
  0 siblings, 0 replies; 14+ messages in thread
From: Simon Horman @ 2007-11-16 18:54 UTC (permalink / raw)
  To: Ken'ichi Ohmichi; +Cc: lkml, kexec-ml

On Fri, Nov 16, 2007 at 11:33:07AM +0900, Ken'ichi Ohmichi wrote:
> 
> It is better that the existing offsetof() is used for VMCOREINFO_OFFSET().
> 
> This discussion is the following:
> http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0584.html
> 
> Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>

Acked-by: Simon Horman <horms@verge.net.au>

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

* Re: [PATCH 3/5] Add "VMCOREINFO_" to all the call for vmcoreinfo_append_str()
  2007-11-16  2:33 ` [PATCH 3/5] Add "VMCOREINFO_" to all the call for vmcoreinfo_append_str() Ken'ichi Ohmichi
@ 2007-11-16 18:55   ` Simon Horman
  0 siblings, 0 replies; 14+ messages in thread
From: Simon Horman @ 2007-11-16 18:55 UTC (permalink / raw)
  To: Ken'ichi Ohmichi; +Cc: lkml, kexec-ml

On Fri, Nov 16, 2007 at 11:33:14AM +0900, Ken'ichi Ohmichi wrote:
> 
> For readability, all the calls to vmcoreinfo_append_str() are changed to macros
> having a prefix "VMCOREINFO_".
> 
> This discussion is the following:
> http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0584.html
> 
> Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>

Acked-by: Simon Horman <horms@verge.net.au>

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

* Re: [PATCH 5/5] Add the array length of "free_list" for filtering free pages
  2007-11-16  2:33 ` [PATCH 5/5] Add the array length of "free_list" for filtering free pages Ken'ichi Ohmichi
@ 2007-11-16 19:16   ` Simon Horman
  0 siblings, 0 replies; 14+ messages in thread
From: Simon Horman @ 2007-11-16 19:16 UTC (permalink / raw)
  To: Ken'ichi Ohmichi; +Cc: lkml, kexec-ml

On Fri, Nov 16, 2007 at 11:33:26AM +0900, Ken'ichi Ohmichi wrote:
> 
> This patch adds the array length of "free_area.free_list" to the vmcoreinfo
> data so that makedumpfile (dump filtering command) can exclude all free pages
> in linux-2.6.24.
> 
> makedumpfile creates a small dumpfile by excluding unnecessary pages for the
> analysis. To distinguish unnecessary pages, makedumpfile gets the vmcoreinfo
> data which has the minimum debugging information only for dump filtering.
> 
> In 2.6.24-rc1 or later, the free_area.free_list is an array which has one list
> for each migrate types instead of a single list. makedumpfile needs the array
> length of "free_area.free_list" and the vmcoreinfo data should contain it.
> 
> 
> Signed-off-by: Huang Ying <ying.huang@intel.com>
> Tested-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>

This seems fine to me. Though from a point of maintainability
would it be better if VMCOREINFO_LENGTH derived the length
from the element of the type in question. Just a thought,
I haven't hacked it up to see how practical it might be.

Acked-by: Simon Horman <horms@verge.net.au>

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

* Re: [PATCH 4/5] Fix the configuration dependencies
  2007-11-16 16:25   ` Simon Horman
@ 2007-11-21  2:50     ` Ken'ichi Ohmichi
  0 siblings, 0 replies; 14+ messages in thread
From: Ken'ichi Ohmichi @ 2007-11-21  2:50 UTC (permalink / raw)
  To: Simon Horman; +Cc: kexec-ml, lkml


Hi Simon,

Thank you for reviewing and your "Acked-by" signs.

Simon Horman wrote:
> On Fri, Nov 16, 2007 at 11:33:20AM +0900, Ken'ichi Ohmichi wrote:
>> This patch fixes the configuration dependencies in the vmcoreinfo data.
>>
>> i386's "node_data" is defined in arch/x86/mm/discontig_32.c,
>> and x86_64's one is defined in arch/x86/mm/numa_64.c.
>> They depend on CONFIG_NUMA:
>>   arch/x86/mm/Makefile_32:7
>>     obj-$(CONFIG_NUMA) += discontig_32.o
>>   arch/x86/mm/Makefile_64:7
>>     obj-$(CONFIG_NUMA) += numa_64.o
>>
>> ia64's "pgdat_list" is defined in arch/ia64/mm/discontig.c,
>> and it depends on CONFIG_DISCONTIGMEM and CONFIG_SPARSEMEM:
>>   arch/ia64/mm/Makefile:9-10
>>     obj-$(CONFIG_DISCONTIGMEM) += discontig.o
>>     obj-$(CONFIG_SPARSEMEM)    += discontig.o
>>
>> ia64's "node_memblk" is defined in arch/ia64/mm/numa.c,
>> and it depends on CONFIG_NUMA:
>>   arch/ia64/mm/Makefile:8
>>     obj-$(CONFIG_NUMA)         += numa.o
>>
>> Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
> 
> This appears correct to me, checking through the symbols and the
> location of their deffinitions, though I have not had a chance to run
> many build checks.
> 
> I also note that CONFIG_ARCH_DISCONTIGMEM_ENABLE does not even
> appear to exist on i386, so it looks that without this change
> the code in question whould never be enabled.

If you enable "Numa Memory Allocation and Scheduler Support" in i386's
menuconfig, CONFIG_ARCH_DISCONTIGMEM_ENABLE is enabled.


Thanks
Ken'ichi Ohmichi 


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

* Re: [PATCH 4/5] Fix the configuration dependencies
  2007-11-16  2:33 ` [PATCH 4/5] Fix the configuration dependencies Ken'ichi Ohmichi
  2007-11-16 16:25   ` Simon Horman
@ 2007-11-26  7:58   ` Andrew Morton
  2007-11-27  9:38     ` Ken'ichi Ohmichi
  1 sibling, 1 reply; 14+ messages in thread
From: Andrew Morton @ 2007-11-26  7:58 UTC (permalink / raw)
  To: Ken'ichi Ohmichi; +Cc: lkml, kexec-ml

On Fri, 16 Nov 2007 11:33:20 +0900 "Ken'ichi Ohmichi" <oomichi@mxs.nes.nec.co.jp> wrote:

> 
> This patch fixes the configuration dependencies in the vmcoreinfo data.
> 
> i386's "node_data" is defined in arch/x86/mm/discontig_32.c,
> and x86_64's one is defined in arch/x86/mm/numa_64.c.
> They depend on CONFIG_NUMA:
>   arch/x86/mm/Makefile_32:7
>     obj-$(CONFIG_NUMA) += discontig_32.o
>   arch/x86/mm/Makefile_64:7
>     obj-$(CONFIG_NUMA) += numa_64.o
> 
> ia64's "pgdat_list" is defined in arch/ia64/mm/discontig.c,
> and it depends on CONFIG_DISCONTIGMEM and CONFIG_SPARSEMEM:
>   arch/ia64/mm/Makefile:9-10
>     obj-$(CONFIG_DISCONTIGMEM) += discontig.o
>     obj-$(CONFIG_SPARSEMEM)    += discontig.o
> 
> ia64's "node_memblk" is defined in arch/ia64/mm/numa.c,
> and it depends on CONFIG_NUMA:
>   arch/ia64/mm/Makefile:8
>     obj-$(CONFIG_NUMA)         += numa.o
> 
> Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
> ---
> diff -rpuN a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c
> --- a/arch/ia64/kernel/machine_kexec.c	2007-11-14 15:39:06.000000000 +0900
> +++ b/arch/ia64/kernel/machine_kexec.c	2007-11-14 15:41:41.000000000 +0900
> @@ -129,10 +129,11 @@ void machine_kexec(struct kimage *image)
>  
>  void arch_crash_save_vmcoreinfo(void)
>  {
> -#if defined(CONFIG_ARCH_DISCONTIGMEM_ENABLE) && defined(CONFIG_NUMA)
> +#if defined(CONFIG_DISCONTIGMEM) || defined(CONFIG_SPARSEMEM)
>  	VMCOREINFO_SYMBOL(pgdat_list);
>  	VMCOREINFO_LENGTH(pgdat_list, MAX_NUMNODES);
> -
> +#endif
> +#ifdef CONFIG_NUMA
>  	VMCOREINFO_SYMBOL(node_memblk);
>  	VMCOREINFO_LENGTH(node_memblk, NR_NODE_MEMBLKS);
>  	VMCOREINFO_STRUCT_SIZE(node_memblk_s);
> diff -rpuN a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
> --- a/arch/x86/kernel/machine_kexec_32.c	2007-11-14 15:39:19.000000000 +0900
> +++ b/arch/x86/kernel/machine_kexec_32.c	2007-11-14 15:39:33.000000000 +0900
> @@ -151,7 +151,7 @@ NORET_TYPE void machine_kexec(struct kim
>  
>  void arch_crash_save_vmcoreinfo(void)
>  {
> -#ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE
> +#ifdef CONFIG_NUMA
>  	VMCOREINFO_SYMBOL(node_data);
>  	VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
>  #endif
> diff -rpuN a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
> --- a/arch/x86/kernel/machine_kexec_64.c	2007-11-14 15:39:19.000000000 +0900
> +++ b/arch/x86/kernel/machine_kexec_64.c	2007-11-14 15:39:33.000000000 +0900
> @@ -235,7 +235,7 @@ void arch_crash_save_vmcoreinfo(void)
>  {
>  	VMCOREINFO_SYMBOL(init_level4_pgt);
>  
> -#ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE
> +#ifdef CONFIG_NUMA
>  	VMCOREINFO_SYMBOL(node_data);
>  	VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
>  #endif
> _
> 

x86_64-make-sparsemem-vmemmap-the-default-memory-model-v2.patch removes the
`VMCOREINFO_SYMBOL(node_data);' from arch/x86/kernel/machine_kexec_64.c
altogether, so I dropped that part of your patch.


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

* Re: [PATCH 4/5] Fix the configuration dependencies
  2007-11-26  7:58   ` Andrew Morton
@ 2007-11-27  9:38     ` Ken'ichi Ohmichi
  2007-11-27 18:18       ` Christoph Lameter
  0 siblings, 1 reply; 14+ messages in thread
From: Ken'ichi Ohmichi @ 2007-11-27  9:38 UTC (permalink / raw)
  To: Andrew Morton; +Cc: kexec-ml, lkml, Christoph Lameter


Hi Andrew,

Andrew Morton wrote:
>> diff -rpuN a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
>> --- a/arch/x86/kernel/machine_kexec_64.c	2007-11-14 15:39:19.000000000 +0900
>> +++ b/arch/x86/kernel/machine_kexec_64.c	2007-11-14 15:39:33.000000000 +0900
>> @@ -235,7 +235,7 @@ void arch_crash_save_vmcoreinfo(void)
>>  {
>>  	VMCOREINFO_SYMBOL(init_level4_pgt);
>>  
>> -#ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE
>> +#ifdef CONFIG_NUMA
>>  	VMCOREINFO_SYMBOL(node_data);
>>  	VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
>>  #endif
>> _
>>
> 
> x86_64-make-sparsemem-vmemmap-the-default-memory-model-v2.patch removes the
> `VMCOREINFO_SYMBOL(node_data);' from arch/x86/kernel/machine_kexec_64.c
> altogether, so I dropped that part of your patch.

The above part is necessary for a NUMA kernel.
Could you please merge the attached patch ?

I guess that Christoph Lameter deleted the above part (which is added
by the attached patch again) with the other part of discontigmem lines,
because it depended on CONFIG_ARCH_DISCONTIGMEM_ENABLE.
But the dependency was wrong, and it should depend on CONFIG_NUMA.
The part is necessary for a NUMA kernel even if sparsemem.


Thanks
Ken'ichi Ohmichi

---
Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
---
diff -rpuN a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
--- a/arch/x86/kernel/machine_kexec_64.c	2007-11-27 13:36:32.000000000 +0900
+++ b/arch/x86/kernel/machine_kexec_64.c	2007-11-27 13:37:37.000000000 +0900
@@ -234,5 +234,10 @@ NORET_TYPE void machine_kexec(struct kim
 void arch_crash_save_vmcoreinfo(void)
 {
 	VMCOREINFO_SYMBOL(init_level4_pgt);
+
+#ifdef CONFIG_NUMA
+	VMCOREINFO_SYMBOL(node_data);
+	VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
+#endif
 }
 
_

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

* Re: [PATCH 4/5] Fix the configuration dependencies
  2007-11-27  9:38     ` Ken'ichi Ohmichi
@ 2007-11-27 18:18       ` Christoph Lameter
  0 siblings, 0 replies; 14+ messages in thread
From: Christoph Lameter @ 2007-11-27 18:18 UTC (permalink / raw)
  To: Ken'ichi Ohmichi; +Cc: Andrew Morton, kexec-ml, lkml

On Tue, 27 Nov 2007, Ken'ichi Ohmichi wrote:

> I guess that Christoph Lameter deleted the above part (which is added
> by the attached patch again) with the other part of discontigmem lines,
> because it depended on CONFIG_ARCH_DISCONTIGMEM_ENABLE.
> But the dependency was wrong, and it should depend on CONFIG_NUMA.
> The part is necessary for a NUMA kernel even if sparsemem.

Acked-by: Christoph Lameter <clameter@sgi.com>

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

end of thread, other threads:[~2007-11-27 18:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <473CFE14.3010400@mxs.nes.nec.co.jp>
2007-11-16  2:33 ` [PATCH 1/5] Rename vmcoreinfo's macros returning the size Ken'ichi Ohmichi
2007-11-16 18:26   ` Simon Horman
2007-11-16  2:33 ` [PATCH 2/5] Use the existing offsetof() for VMCOREINFO_OFFSET() Ken'ichi Ohmichi
2007-11-16 18:54   ` Simon Horman
2007-11-16  2:33 ` [PATCH 3/5] Add "VMCOREINFO_" to all the call for vmcoreinfo_append_str() Ken'ichi Ohmichi
2007-11-16 18:55   ` Simon Horman
2007-11-16  2:33 ` [PATCH 4/5] Fix the configuration dependencies Ken'ichi Ohmichi
2007-11-16 16:25   ` Simon Horman
2007-11-21  2:50     ` Ken'ichi Ohmichi
2007-11-26  7:58   ` Andrew Morton
2007-11-27  9:38     ` Ken'ichi Ohmichi
2007-11-27 18:18       ` Christoph Lameter
2007-11-16  2:33 ` [PATCH 5/5] Add the array length of "free_list" for filtering free pages Ken'ichi Ohmichi
2007-11-16 19:16   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox