[PATCH v4] makedumpfile: Exclude unnecessary hugepages.
bhe at redhat.com
bhe at redhat.com
Fri Sep 12 00:12:10 PDT 2014
On 09/11/14 at 10:04am, Atsushi Kumagai wrote:
> >On 09/11/14 at 08:52am, Atsushi Kumagai wrote:
> >> >Hi Atsushi,
> >> >
> >> >Since huge pages are included in user pages, I can't think of a way to
> >> >make test cases for huge page exclusion. Could you give some suggestions
> >> >on this or how did you test it?
> >>
> >> Before I posted this patch, I tested as below.
> >> This idea came from the fact that old makedumpfile can't exclude
> >> huge pages except the first page(PG_head).
> >>
> >> 1. Get the number of hugepages from /proc/meminfo
> >> 2. Calculate the number of PG_tail pages
> >> 3. Capture the dumpfile without filtering
> >> 4. Run makedumpfile and compare the report message between v1.5.6
> >> and v1.5.7(rc) to get how many user pages become excludable with
> >> this patch.
> >> 5. The result of Step2's and Step4's must be same, confirm it.
> >>
> >> The way above is for THP but you can apply it also for hugetlbfs
> >> if you take care of the things that old makedumpfile can't exclude
> >> *any* hugetlbfs pages.
> >
> >But THP is also Anonymous pages, doesn't it do the same for THP between
> >1.5.6 and 1.5.7?
>
> Only a PG_head page is marked as an anonymous page, makedumpfile doesn't
> distinguish PG_tail pages as anonymous pages. Please see below.
>
> do_huge_pmd_anonymous_page()
> + __do_huge_pmd_anonymous_page()
> + page_add_new_anon_rmap()
> + __page_set_anon_rmap()
Yes, you are right. Thanks, Atsushi!
More information about the kexec
mailing list