From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>,
linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
linux-mm@kvack.org
Subject: Re: [PATCH v2] Add the values related to buddy system for filtering free pages.
Date: Wed, 19 Dec 2012 17:20:42 -0800 [thread overview]
Message-ID: <87ip7xwmc5.fsf@xmission.com> (raw)
In-Reply-To: <20121219170038.f7b260c3.akpm@linux-foundation.org> (Andrew Morton's message of "Wed, 19 Dec 2012 17:00:38 -0800")
Andrew Morton <akpm@linux-foundation.org> writes:
> On Wed, 19 Dec 2012 16:57:03 -0800
> ebiederm@xmission.com (Eric W. Biederman) wrote:
>
>> Andrew Morton <akpm@linux-foundation.org> writes:
>>
>> > Is there any way in which we can move some of this logic into the
>> > kernel? In this case, add some kernel code which uses PageBuddy() on
>> > behalf of makedumpfile, rather than replicating the PageBuddy() logic
>> > in userspace?
>>
>> All that exists when makedumpfile runs is a core file. So it would have
>> to be something like a share library that builds with the kernel and
>> then makedumpfile loads.
>
> Can we omit free pages from that core file?
>
> And/or add a section to that core file which flags free pages?
Ommitting pages is what makedumpfile does.
Very loosely shortly after boot when things are running fine /sbin/kexec
runs.
/sbin/kexec constructs a set of elf headers that describe where the
memory is and load the crashdump kernel an initrd and those elf headers
into memory.
Years later when the running kernel calls panic.
panic calls machine_kexec
machine_kexec jmps to the preloaded crashdump kernel.
I think it is /proc/vmcore that reads the elf headers out of memory and
presents them to userspace.
Then we have options.
vmcore-to-dmesg will just read the dmesg ring buffer so we have that.
makedumpfile reads the kernel data structures and filters out the free
pages for people who don't want to write everything to disk.
So the basic interface is strongly kernel version agnostic. The
challenge is how to filter out undesirable pages from the core dump
quickly and reliably.
Right now what we have are a set of ELF notes that describe struct page.
For my uses I have either had enough disk space that saving everything
didn't matter or so little disk space that all I could afford was
getting out the dmesg ring buffer. So I don't know how robust the
solution adopted by makedumpfile is.
Eric
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-12-20 1:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20121210103913.020858db777e2f48c59713b6@mxc.nes.nec.co.jp>
2012-12-20 0:18 ` Andrew Morton
2012-12-20 0:57 ` Eric W. Biederman
2012-12-20 1:00 ` Andrew Morton
2012-12-20 1:20 ` Eric W. Biederman [this message]
2012-12-20 2:21 ` Atsushi Kumagai
2012-12-20 3:02 ` Hatayama, Daisuke
2012-12-21 2:00 ` Eric W. Biederman
2012-12-27 8:35 ` Atsushi Kumagai
2013-02-07 12:29 ` Lisa Mitchell
2013-02-08 2:45 ` Atsushi Kumagai
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=87ip7xwmc5.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=kexec@lists.infradead.org \
--cc=kumagai-atsushi@mxc.nes.nec.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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