[lkml]   [2014]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] Save PG_head_mask in VMCOREINFO
To allow filtering of huge pages, makedumpfile must be able to
identify them in the dump. This can be done by checking the
appropriate page flag, so communicate its value to makedumpfile
through the VMCOREINFO interface.

There's only one small catch. Depending on how many page flags
are available on a given architecture, this bit can be called
PG_head or PG_compound.

I sent a similar patch back in 2012, but Eric Biederman did not
like using an #ifdef. So, this time I'm adding a common symbol
(PG_head_mask) instead.

See for the previous version.

Signed-off-by: Petr Tesarik <>
include/linux/page-flags.h | 3 +++
kernel/kexec.c | 1 +
2 files changed, 4 insertions(+)

diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index d1fe1a7..bc2007e 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -348,6 +348,9 @@ static inline void ClearPageCompound(struct page
*page) ClearPageHead(page);
+#define PG_head_mask ((1L << PG_head))
* Reduce page flag use as much as possible by overlapping
diff --git a/kernel/kexec.c b/kernel/kexec.c
index c8380ad..e6f3aec 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1622,6 +1622,7 @@ static int __init crash_save_vmcoreinfo_init(void)


 \ /
  Last update: 2014-04-11 18:01    [W:0.042 / U:17.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site