From: Vivek Goyal <vgoyal@redhat.com>
To: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Cc: kexec@lists.infradead.org, ebiederm@xmission.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] Add the values related to buddy system for filtering free pages.
Date: Mon, 10 Dec 2012 08:17:05 -0500 [thread overview]
Message-ID: <20121210131705.GC26447@redhat.com> (raw)
In-Reply-To: <20121210103913.020858db777e2f48c59713b6@mxc.nes.nec.co.jp>
On Mon, Dec 10, 2012 at 10:39:13AM +0900, Atsushi Kumagai wrote:
> This patch adds the values related to buddy system to vmcoreinfo data
> so that makedumpfile (dump filtering command) can filter out all free
> pages with the new logic.
> It's faster than the current logic because it can distinguish free page
> by analyzing page structure at the same time as filtering for other
> unnecessary pages (e.g. anonymous page).
> OTOH, the current logic has to trace free_list to distinguish free
> pages while analyzing page structure to filter out other unnecessary
> pages.
>
> The new logic uses the fact that buddy page is marked by _mapcount ==
> PAGE_BUDDY_MAPCOUNT_VALUE. But, _mapcount shares its memory with other
> fields for SLAB/SLUB when PG_slab is set, so we need to check if PG_slab
> is set or not before looking up _mapcount value.
> And we can get the order of buddy system from private field.
> To sum it up, the values below are required for this logic.
>
> Required values:
> - OFFSET(page._mapcount)
> - OFFSET(page.private)
> - NUMBER(PG_slab)
> - NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE)
>
> Changelog from v1 to v2:
> 1. remove SIZE(pageflags)
> The new logic was changed after I sent v1 patch.
> Accordingly, SIZE(pageflags) has been unnecessary for makedumpfile.
>
> What's makedumpfile:
> 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.
>
> Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Looks good to me.
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Thanks
Vivek
> ---
> kernel/kexec.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/kexec.c b/kernel/kexec.c
> index 5e4bd78..b27efe4 100644
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -1490,6 +1490,8 @@ static int __init crash_save_vmcoreinfo_init(void)
> VMCOREINFO_OFFSET(page, _count);
> VMCOREINFO_OFFSET(page, mapping);
> VMCOREINFO_OFFSET(page, lru);
> + VMCOREINFO_OFFSET(page, _mapcount);
> + VMCOREINFO_OFFSET(page, private);
> VMCOREINFO_OFFSET(pglist_data, node_zones);
> VMCOREINFO_OFFSET(pglist_data, nr_zones);
> #ifdef CONFIG_FLAT_NODE_MEM_MAP
> @@ -1512,6 +1514,8 @@ static int __init crash_save_vmcoreinfo_init(void)
> VMCOREINFO_NUMBER(PG_lru);
> VMCOREINFO_NUMBER(PG_private);
> VMCOREINFO_NUMBER(PG_swapcache);
> + VMCOREINFO_NUMBER(PG_slab);
> + VMCOREINFO_NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE);
>
> arch_crash_save_vmcoreinfo();
> update_vmcoreinfo_note();
> --
> 1.7.9.2
>
> _______________________________________________
> 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
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Cc: ebiederm@xmission.com, kexec@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] Add the values related to buddy system for filtering free pages.
Date: Mon, 10 Dec 2012 08:17:05 -0500 [thread overview]
Message-ID: <20121210131705.GC26447@redhat.com> (raw)
In-Reply-To: <20121210103913.020858db777e2f48c59713b6@mxc.nes.nec.co.jp>
On Mon, Dec 10, 2012 at 10:39:13AM +0900, Atsushi Kumagai wrote:
> This patch adds the values related to buddy system to vmcoreinfo data
> so that makedumpfile (dump filtering command) can filter out all free
> pages with the new logic.
> It's faster than the current logic because it can distinguish free page
> by analyzing page structure at the same time as filtering for other
> unnecessary pages (e.g. anonymous page).
> OTOH, the current logic has to trace free_list to distinguish free
> pages while analyzing page structure to filter out other unnecessary
> pages.
>
> The new logic uses the fact that buddy page is marked by _mapcount ==
> PAGE_BUDDY_MAPCOUNT_VALUE. But, _mapcount shares its memory with other
> fields for SLAB/SLUB when PG_slab is set, so we need to check if PG_slab
> is set or not before looking up _mapcount value.
> And we can get the order of buddy system from private field.
> To sum it up, the values below are required for this logic.
>
> Required values:
> - OFFSET(page._mapcount)
> - OFFSET(page.private)
> - NUMBER(PG_slab)
> - NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE)
>
> Changelog from v1 to v2:
> 1. remove SIZE(pageflags)
> The new logic was changed after I sent v1 patch.
> Accordingly, SIZE(pageflags) has been unnecessary for makedumpfile.
>
> What's makedumpfile:
> 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.
>
> Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Looks good to me.
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Thanks
Vivek
> ---
> kernel/kexec.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/kexec.c b/kernel/kexec.c
> index 5e4bd78..b27efe4 100644
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -1490,6 +1490,8 @@ static int __init crash_save_vmcoreinfo_init(void)
> VMCOREINFO_OFFSET(page, _count);
> VMCOREINFO_OFFSET(page, mapping);
> VMCOREINFO_OFFSET(page, lru);
> + VMCOREINFO_OFFSET(page, _mapcount);
> + VMCOREINFO_OFFSET(page, private);
> VMCOREINFO_OFFSET(pglist_data, node_zones);
> VMCOREINFO_OFFSET(pglist_data, nr_zones);
> #ifdef CONFIG_FLAT_NODE_MEM_MAP
> @@ -1512,6 +1514,8 @@ static int __init crash_save_vmcoreinfo_init(void)
> VMCOREINFO_NUMBER(PG_lru);
> VMCOREINFO_NUMBER(PG_private);
> VMCOREINFO_NUMBER(PG_swapcache);
> + VMCOREINFO_NUMBER(PG_slab);
> + VMCOREINFO_NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE);
>
> arch_crash_save_vmcoreinfo();
> update_vmcoreinfo_note();
> --
> 1.7.9.2
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2012-12-10 13:17 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 1:39 [PATCH v2] Add the values related to buddy system for filtering free pages Atsushi Kumagai
2012-12-10 1:39 ` Atsushi Kumagai
2012-12-10 13:17 ` Vivek Goyal [this message]
2012-12-10 13:17 ` Vivek Goyal
2012-12-17 15:02 ` Vivek Goyal
2012-12-17 15:02 ` Vivek Goyal
2012-12-20 0:18 ` Andrew Morton
2012-12-20 0:18 ` Andrew Morton
2012-12-20 0:18 ` Andrew Morton
2012-12-20 0:57 ` Eric W. Biederman
2012-12-20 0:57 ` Eric W. Biederman
2012-12-20 0:57 ` Eric W. Biederman
2012-12-20 1:00 ` Andrew Morton
2012-12-20 1:00 ` Andrew Morton
2012-12-20 1:00 ` Andrew Morton
2012-12-20 1:20 ` Eric W. Biederman
2012-12-20 1:20 ` Eric W. Biederman
2012-12-20 1:20 ` Eric W. Biederman
2012-12-20 2:21 ` Atsushi Kumagai
2012-12-20 2:21 ` Atsushi Kumagai
2012-12-20 2:21 ` Atsushi Kumagai
2012-12-20 3:02 ` Hatayama, Daisuke
2012-12-20 3:02 ` Hatayama, Daisuke
2012-12-20 3:02 ` Hatayama, Daisuke
2012-12-21 2:00 ` Eric W. Biederman
2012-12-21 2:00 ` Eric W. Biederman
2012-12-21 2:00 ` Eric W. Biederman
2012-12-27 8:35 ` Atsushi Kumagai
2012-12-27 8:35 ` Atsushi Kumagai
2012-12-27 8:35 ` Atsushi Kumagai
2013-02-07 12:29 ` Lisa Mitchell
2013-02-07 12:29 ` Lisa Mitchell
2013-02-07 12:29 ` Lisa Mitchell
2013-02-08 2:45 ` Atsushi Kumagai
2013-02-08 2:45 ` Atsushi Kumagai
2013-02-08 2:45 ` Atsushi Kumagai
2013-02-08 14:59 ` Mitchell, Lisa (MCLinux in Fort Collins)
2013-02-08 14:59 ` Mitchell, Lisa (MCLinux in Fort Collins)
2013-02-08 14:59 ` Mitchell, Lisa (MCLinux in Fort Collins)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121210131705.GC26447@redhat.com \
--to=vgoyal@redhat.com \
--cc=ebiederm@xmission.com \
--cc=kexec@lists.infradead.org \
--cc=kumagai-atsushi@mxc.nes.nec.co.jp \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.