public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Cc: oomichi@mxs.nes.nec.co.jp, d.hatayama@jp.fujitsu.com,
	kexec@lists.infradead.org, vgoyal@redhat.com
Subject: Re: makedumpfile memory usage grows with system memory size
Date: Fri, 27 Apr 2012 08:52:14 -0400	[thread overview]
Message-ID: <20120427125214.GF28185@redhat.com> (raw)
In-Reply-To: <20120427164649.9932a33f.kumagai-atsushi@mxc.nes.nec.co.jp>

On Fri, Apr 27, 2012 at 04:46:49PM +0900, Atsushi Kumagai wrote:
> Hello,
> 
> On Thu, 12 Apr 2012 16:47:14 +0900 (JST)
> HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com> wrote:
> 
> [..]
> > > I said I want to avoid changing behavior based on kernel versions, 
> > > but it seems difficult as Vivek said. So, I will accept the changing
> > > if it is necessary.
> > > 
> > > Now, I will make two prototypes to consider the method to figure out
> > > free pages.
> > > 
> > >   - a prototype based on _count
> > >   - a prototype based on PG_buddy (or _mapcount)
> > >   
> > > If prototypes work fine, then we can select the method.
> > 
> > I think the first one would work well and it's more accurate in
> > meaning of free page.
> > 
> > Although this might be not problematic in practice, new method that
> > walks on page tables can lead to different result from the previous
> > one that looks up free_list: looking at __free_pages(), it first
> > decreases page->_count and then add the page to free_list, and looking
> > at __alloc_pages(), it first retrieves a page from free_list and then
> > set page->_count to 1.
> 
> I tested the prototype based on _count and the other based on _mapcount.
> So, the former didn't work as expected while the latter worked fine.
> (The former excluded some used pages as free pages.)
> 
> As a next step, I measured performance of the prototype based on _mapcount,
> please see below.

Thanks for this work.  I assume this work just switches the free page
referencing and does not attempt to try and cut down on the memory usage
(I guess that would be the next step if using mapcount is acceptable)?

> 
> 
> Performance Comparison:
> 
>   Explanation:
>     - The new method supports 2.6.39 and later, and it needs vmlinux.
> 
>     - Now, the prototype doesn't support PG_buddy because the value of PG_buddy
>       is different depending on kernel configuration and it isn't stored into 
>       VMCOREINFO. However, I'll extend get_length_of_free_pages() for PG_buddy 
>       when the value of PG_buddy is stored into VMCOREINFO.
> 
>     - The prototype has dump_level "32" to use new method, but I don't think
>       to extend dump_level for official version.
> 
>   How to measure:
>     I measured execution times with vmcore of 5GB in below cases with 
>     attached patches.
> 
>       - dump_level 16: exclude only free pages with the current method
>       - dump_level 31: exclude all excludable pages with the current method
>       - dump_level 32: exclude only free pages with the new method
>       - dump_level 47: exclude all excludable pages with the new method
> 
>   Result:
>      ------------------------------------------------------------------------
>      dump_level	     size [Bytes]    total time	   d_all_time     d_new_time	
>      ------------------------------------------------------------------------
>      	16		431864384	28.6s	     4.19s	      0s
>      	31		111808568	14.5s	      0.9s	      0s
>      	32		431864384	41.2s	     16.8s	   0.05s
>      	47		111808568	31.5s	     16.6s	   0.05s
>      ------------------------------------------------------------------------
> 
>   Discussion:
>     I think the new method can be used instead of the current method in many cases.
>     (However, the result of dump_level 31 looks too fast, I'm researching why
>     the case can execute so fast.)
> 
>     I would like to get your opinion.

I am curious.  Looking through your patches, it seems d_all_time's
increase in time should be from the new method because the if-statement is
setup to only accept the new method.  Therefore I was expecting d_new_time
for the new method when added to d_all_time for the current method would
come close to d_all_time for the new method.  IOW I would have expected
the extra 10-12 seconds from the new method to be found in d_new_time.

However, I do not see that.  d_new_time hardly increases at all.  So what
is accounting for the increase in d_all_time for the new method?

Thanks,
Don

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2012-04-27 13:23 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-28 21:22 makedumpfile memory usage grows with system memory size Don Zickus
2012-03-29  8:09 ` Ken'ichi Ohmichi
2012-03-29 12:56   ` HATAYAMA Daisuke
2012-03-29 13:25     ` Don Zickus
2012-03-30  0:51       ` HATAYAMA Daisuke
2012-04-02  7:46         ` Atsushi Kumagai
2012-04-05  6:52           ` HATAYAMA Daisuke
2012-04-05 14:34             ` Vivek Goyal
2012-04-06  1:12               ` HATAYAMA Daisuke
2012-04-06  8:59                 ` Atsushi Kumagai
2012-04-06  9:29                   ` HATAYAMA Daisuke
2012-04-09 18:57                     ` Vivek Goyal
2012-04-09 23:58                       ` HATAYAMA Daisuke
2012-04-10 12:52                         ` Vivek Goyal
2012-04-12  3:40                           ` Atsushi Kumagai
2012-04-12  7:47                             ` HATAYAMA Daisuke
     [not found]                               ` <20120427164649.9932a33f.kumagai-atsushi@mxc.nes.nec.co.jp>
2012-04-27 12:52                                 ` Don Zickus [this message]
2012-05-11  1:19                                   ` Atsushi Kumagai
2012-05-11 13:26                                     ` Don Zickus
2012-05-15  5:57                                       ` Atsushi Kumagai
2012-05-15 12:35                                         ` Don Zickus
2012-04-27 13:33                                 ` Vivek Goyal
2012-05-14  5:44                                 ` HATAYAMA Daisuke
2012-05-16  8:02                                   ` Atsushi Kumagai
2012-05-17  0:21                                     ` HATAYAMA Daisuke
2012-04-09 19:00                 ` Vivek Goyal
2012-03-29 13:05   ` Don Zickus
2012-03-30  9:43     ` Atsushi Kumagai
2012-03-30 13:19       ` Don Zickus
2012-04-02 17:15   ` Michael Holzheu
2012-04-06  8:09     ` Atsushi Kumagai
2012-04-11  8:04       ` Michael Holzheu
2012-04-12  8:49         ` Atsushi Kumagai
  -- strict thread matches above, loose matches on Subject: below --
2012-04-02  6:53 tachibana

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=20120427125214.GF28185@redhat.com \
    --to=dzickus@redhat.com \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    --cc=oomichi@mxs.nes.nec.co.jp \
    --cc=vgoyal@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox