mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
To: jingbai.ma@hp.com
Cc: vgoyal@redhat.com, kexec@lists.infradead.org,
	linux-kernel@vger.kernel.org, lisa.mitchell@hp.com,
	mingo@redhat.com, kumagai-atsushi@mxc.nes.nec.co.jp,
	ebiederm@xmission.com, hpa@zytor.com, yinghai@kernel.org
Subject: Re: [RFC PATCH 0/5] crash dump bitmap: scan memory pages in kernel to speedup kernel dump process
Date: Sat, 09 Mar 2013 13:31:18 +0900 (JST)	[thread overview]
Message-ID: <20130309.133118.214580151.d.hatayama@jp.fujitsu.com> (raw)
In-Reply-To: <5139B827.3050500@hp.com>

From: Jingbai Ma <jingbai.ma@hp.com>
Subject: Re: [RFC PATCH 0/5] crash dump bitmap: scan memory pages in kernel to speedup kernel dump process
Date: Fri, 8 Mar 2013 18:06:31 +0800

> On 03/07/2013 11:21 PM, Vivek Goyal wrote:
>> On Thu, Mar 07, 2013 at 10:58:18PM +0800, Jingbai Ma wrote:
...
>> First of all 64MB per TB should not be a huge deal. And makedumpfile
>> also has this cyclic mode where you process a map, discard it and then
>> move on to next section. So memory usage remains constant at the
>> expense
>> of processing time.
> 
> Yes, that's true. But in cyclic mode, makedumpfile will have to
> write/read bitmap from storage, it will also impact the performance.
> I have measured the penalty for cyclic mode is about 70%
> slowdown. Maybe could be faster after mmap implemented.

I guess the slowdown came from the issue that enough VMCOREINFO was
not provided from the kernel, and unnecessary filtering processing for
free pages is done multiple times.

For example, confirm how filtering is done in your environment like
this:

$ makedumpfile --message-level 16      # 16 is report message
makedumpfile: map_size = 4
sadump: does not have partition header
...
  pfn_end    : 880000
Can't select page_is_buddy handler; follow free lists instead of mem_map array.
STEP [Excluding free pages       ] : 0.431724 seconds
STEP [Excluding unnecessary pages] : 1.052160 seconds

Here STEP [..] colum occurs the number of cycles in cyclic-mode. If
STEP [Excluding free pages ] column occurs multiple times in log, it
causes the slowdown on your environment. (free_list doesn't sort its
elements in pfn's order, so we have only to iterate a whole part of
free_list in each cycle...; it could amount to be close to a whole
memory size in worst case just after system boot)

To use mem_map array logic, VMCOREINFO nees to have the corresponding
information to refer to related data structures. The patch is 

commit 8d67091ec6ae98ca67f77990ef9e9ec21337f077
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Wed Feb 27 17:03:25 2013 -0800

    kexec: add the values related to buddy system for filtering free pages.

and it has been merged in 3.9-rc1.

$ git describe 8d67091ec6ae98ca67f77990ef9e9ec21337f077
v3.8-9443-g8d67091

Or you can edit VMCOREINFO manually and specify it to makedumpfile as:

1. generate vmcoreinfo from vmlinux

  makedumpfile -x vmlinux -g vmcoreinfo.txt

2. Add the following values in the generated vmcoreinfo.txt

- 3.1, 3.4, 3.8.x
NUMBER(PG_slab)=7
SIZE(pageflags)=4
OFFSET(page._mapcount)=24
OFFSET(page.private)=48
NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE)=-128

- 2.6.38
SIZE(pageflags)=4
OFFSET(page._mapcount)=12
OFFSET(page.private)=16
NUMBER(PG_slab)=7
NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE)=-2

- 2.6.32
NUMBER(PG_slab)=7
NUMBER(PG_buddy)=19
OFFSET(page._mapcount)=12
OFFSET(page.private)=16
SIZE(pageflags)=4

- 2.6.18
NUMBER(PG_slab)=7
NUMBER(PG_buddy)=19
OFFSET(page._mapcount)=12
OFFSET(page.private)=16

3. Specify the vmcoreinfo.txt to makedumpfile via -i option

  makedumpfile -i vmcoreinfo.txt [-c|-l|-p] -d 31 /proc/vmcore dumpfile

Anyway, please help benchmark. I'll send CC to you too.

Thanks.
HATAYAMA, Daisuke


  parent reply	other threads:[~2013-03-09  4:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 14:58 Jingbai Ma
2013-03-07 14:58 ` [RFC PATCH 1/5] crash dump bitmap: add a kernel config and help document Jingbai Ma
2013-03-07 14:58 ` [RFC PATCH 2/5] crash dump bitmap: init crash dump bitmap in kernel booting process Jingbai Ma
2013-03-07 14:58 ` [RFC PATCH 3/5] crash dump bitmap: scan memory pages in kernel crash process Jingbai Ma
2013-03-07 14:59 ` [RFC PATCH 4/5] crash dump bitmap: add a proc interface for crash dump bitmap Jingbai Ma
2013-03-07 14:59 ` [RFC PATCH 5/5] crash dump bitmap: workaround for kernel 3.9-rc1 kdump issue Jingbai Ma
2013-03-07 15:21 ` [RFC PATCH 0/5] crash dump bitmap: scan memory pages in kernel to speedup kernel dump process Vivek Goyal
2013-03-07 21:38   ` Yinghai Lu
2013-03-07 21:54   ` Eric W. Biederman
2013-03-08 15:52     ` Vivek Goyal
2013-03-08 16:19       ` Eric W. Biederman
2013-03-11  8:18       ` Jingbai Ma
2013-03-11  9:42         ` Eric W. Biederman
2013-03-12 10:05           ` Jingbai Ma
2013-03-12 19:48             ` Eric W. Biederman
2013-03-08  1:31   ` HATAYAMA Daisuke
2013-03-08 10:06   ` Jingbai Ma
2013-03-08 10:33     ` H. Peter Anvin
2013-03-08 13:31       ` Ma, Jingbai (Kingboard)
2013-03-08 16:13         ` Eric W. Biederman
2013-03-11  8:31           ` Jingbai Ma
2013-03-08 16:19     ` Vivek Goyal
2013-03-11  8:53       ` Jingbai Ma
2013-03-09  4:31     ` HATAYAMA Daisuke [this message]
2013-03-11  9:02       ` Jingbai Ma
2013-03-08 10:16   ` Jingbai Ma
  -- strict thread matches above, loose matches on Subject: below --
2013-03-07 14:05 Jingbai Ma

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=20130309.133118.214580151.d.hatayama@jp.fujitsu.com \
    --to=d.hatayama@jp.fujitsu.com \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=jingbai.ma@hp.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lisa.mitchell@hp.com \
    --cc=mingo@redhat.com \
    --cc=vgoyal@redhat.com \
    --cc=yinghai@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®