vmcoreinfo: add the array length of "free_list" for filtering free pages
authorKen'ichi Ohmichi <[email protected]>
Tue, 8 Jan 2008 23:33:05 +0000 (15:33 -0800)
committerLinus Torvalds <[email protected]>
Wed, 9 Jan 2008 00:10:36 +0000 (16:10 -0800)
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 <[email protected]>
Tested-by: Ken'ichi Ohmichi <[email protected]>
Acked-by: Simon Horman <[email protected]>
Cc: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/kexec.c

index aa74a1ef2da8003768519e4283d2b392be0a4171..9a26eec9eb04b858cfb7d3244071b94f4d4872c9 100644 (file)
@@ -1404,6 +1404,7 @@ static int __init crash_save_vmcoreinfo_init(void)
        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();