[Patch v3 7/7] add a new interface to show the memory usage of 1st kernel
Baoquan He
bhe at redhat.com
Wed Jul 30 19:32:37 PDT 2014
On 07/29/14 at 08:43am, Vivek Goyal wrote:
> On Mon, Jul 28, 2014 at 04:20:06PM +0800, Baoquan He wrote:
> > Recently people complained that they don't know how to decide how
> > much disk size need be reserved for kdump. E.g there are lots of
> > machines with different memory size, if the memory usage information
> > of current system can be shown, that can help them to make an estimate
> > how much storage space need be reserved.
> >
> > In this patch, a new interface is added into makedumpfile. By the
> > help of this, people can know the page number of memory in different
> > use. The implementation is analyzing the "System Ram" and "kernel text"
> > program segment of /proc/kcore excluding the crashkernel range, then
> > calculating the page number of different kind per vmcoreinfo.
> >
> > The print is like below:
> > ->$ ./makedumpfile --mem-usage /proc/kcore
> > Excluding unnecessary pages : [100.0 %] |
>
> I think above message is now unnecessary. In fact we are not excluding
> any pages.
I reused the function get_num_dumpable_cyclic(). It will iterate each
pages to check whether it's dumpable or not based on the dump_level
specified. While above message is printed inside a internal function. I
don't think it's very necessary, but also I don't think it will misguide
people to think of too much about it. It just tell the progress of
filtering, and could be a little helpful if it's working on a large
memory, say more than 1T memory.
>
> >
> > Page number of memory in different use
> > --------------------------------------------------
>
> Above is not required.
OK, will remove it.
>
>
> > TYPE PAGES EXCLUDABLE DESCRIPTION
>
> We probably should put dashes under these headers
>
> TYPE PAGES EXCLUDABLE DESCRIPTION
> ==== ===== ========== ===========
I am fine with this, will add dashes to decorate it.
>
> > ZERO 0 yes Pages filled with zero
> > CACHE 562006 yes Cache pages
> > CACHE_PRIVATE 353502 yes Cache pages + private
> > USER 225780 yes User process pages
> > FREE 2761884 yes Free pages
> > KERN_DATA 235873 no Dumpable kernel data
>
> What's "Dumpable kernel data" ? Are we saying they are kernel pages which
> can't be filtered?
>
> Why not simply call them "kernel data" or "kernel pages"
Yes, it's misled. WIll change.
>
>
> >
> > Total pages on system: 4139045
>
> How about "Total number of pages".
Will change.
>
> Otherwise this output looks much better than previous version. Thanks for
> the changes.
>
> Vivek
>
> _______________________________________________
> kexec mailing list
> kexec at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
More information about the kexec
mailing list