提交 8639a847 编写于 作者: A Atsushi Kumagai 提交者: Linus Torvalds

kexec: update VMCOREINFO for compound_order/dtor

makedumpfile refers page.lru.next to get the order of compound pages for
page filtering.

However, now the order is stored in page.compound_order, hence
VMCOREINFO should be updated to export the offset of
page.compound_order.

The fact is, page.compound_order was introduced already in kernel 4.0,
but the offset of it was the same as page.lru.next until kernel 4.3, so
this was not actual problem.

The above can be said also for page.lru.prev and page.compound_dtor,
it's necessary to detect hugetlbfs pages.  Further, the content was
changed from direct address to the ID which means dtor.

The problem is that unnecessary hugepages won't be removed from a dump
file in kernels 4.4.x and later.  This means that extra disk space would
be consumed.  It's a problem, but not critical.
Signed-off-by: NAtsushi Kumagai <ats-kumagai@wm.jp.nec.com>
Acked-by: NDave Young <dyoung@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 b75a2bf8
...@@ -1415,6 +1415,8 @@ static int __init crash_save_vmcoreinfo_init(void) ...@@ -1415,6 +1415,8 @@ static int __init crash_save_vmcoreinfo_init(void)
VMCOREINFO_OFFSET(page, lru); VMCOREINFO_OFFSET(page, lru);
VMCOREINFO_OFFSET(page, _mapcount); VMCOREINFO_OFFSET(page, _mapcount);
VMCOREINFO_OFFSET(page, private); VMCOREINFO_OFFSET(page, private);
VMCOREINFO_OFFSET(page, compound_dtor);
VMCOREINFO_OFFSET(page, compound_order);
VMCOREINFO_OFFSET(pglist_data, node_zones); VMCOREINFO_OFFSET(pglist_data, node_zones);
VMCOREINFO_OFFSET(pglist_data, nr_zones); VMCOREINFO_OFFSET(pglist_data, nr_zones);
#ifdef CONFIG_FLAT_NODE_MEM_MAP #ifdef CONFIG_FLAT_NODE_MEM_MAP
...@@ -1447,8 +1449,8 @@ static int __init crash_save_vmcoreinfo_init(void) ...@@ -1447,8 +1449,8 @@ static int __init crash_save_vmcoreinfo_init(void)
#ifdef CONFIG_X86 #ifdef CONFIG_X86
VMCOREINFO_NUMBER(KERNEL_IMAGE_SIZE); VMCOREINFO_NUMBER(KERNEL_IMAGE_SIZE);
#endif #endif
#ifdef CONFIG_HUGETLBFS #ifdef CONFIG_HUGETLB_PAGE
VMCOREINFO_SYMBOL(free_huge_page); VMCOREINFO_NUMBER(HUGETLB_PAGE_DTOR);
#endif #endif
arch_crash_save_vmcoreinfo(); arch_crash_save_vmcoreinfo();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册