From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: "Oren Laadan" <orenl@cs.columbia.edu>
Cc: dave@linux.vnet.ibm.com, arnd@arndb.de, jeremy@goop.org,
linux-kernel@vger.kernel.org,
containers@lists.linux-foundation.org
Subject: Re: [RFC v4][PATCH 4/9] Memory management (dump)
Date: Tue, 9 Sep 2008 11:22:07 +0200 [thread overview]
Message-ID: <19f34abd0809090222u68e90c74l514cd0b50a290d4b@mail.gmail.com> (raw)
In-Reply-To: <1220946154-15174-5-git-send-email-orenl@cs.columbia.edu>
On Tue, Sep 9, 2008 at 9:42 AM, Oren Laadan <orenl@cs.columbia.edu> wrote:
> For each VMA, there is a 'struct cr_vma'; if the VMA is file-mapped,
> it will be followed by the file name. The cr_vma->npages will tell
> how many pages were dumped for this VMA. Then it will be followed
> by the actual data: first a dump of the addresses of all dumped
> pages (npages entries) followed by a dump of the contents of all
> dumped pages (npages pages). Then will come the next VMA and so on.
>
> Signed-off-by: Oren Laadan <orenl@cs.columbia.edu>
> ---
> arch/x86/mm/checkpoint.c | 30 +++
> arch/x86/mm/restart.c | 1 +
> checkpoint/Makefile | 3 +-
> checkpoint/checkpoint.c | 53 ++++++
> checkpoint/ckpt_arch.h | 1 +
> checkpoint/ckpt_mem.c | 448 ++++++++++++++++++++++++++++++++++++++++++++
> checkpoint/ckpt_mem.h | 35 ++++
> checkpoint/sys.c | 23 ++-
> include/asm-x86/ckpt_hdr.h | 5 +
> include/linux/ckpt.h | 12 ++
> include/linux/ckpt_hdr.h | 30 +++
> 11 files changed, 635 insertions(+), 6 deletions(-)
> create mode 100644 checkpoint/ckpt_mem.c
> create mode 100644 checkpoint/ckpt_mem.h
>
> diff --git a/arch/x86/mm/checkpoint.c b/arch/x86/mm/checkpoint.c
> index 71d21e6..50cfd29 100644
> --- a/arch/x86/mm/checkpoint.c
> +++ b/arch/x86/mm/checkpoint.c
> @@ -192,3 +192,33 @@ int cr_write_cpu(struct cr_ctx *ctx, struct task_struct *t)
> cr_hbuf_put(ctx, sizeof(*hh));
> return ret;
> }
> +
> +/* dump the mm->context state */
> +int cr_write_mm_context(struct cr_ctx *ctx, struct mm_struct *mm, int parent)
> +{
> + struct cr_hdr h;
> + struct cr_hdr_mm_context *hh = cr_hbuf_get(ctx, sizeof(*hh));
> + int ret;
> +
> + h.type = CR_HDR_MM_CONTEXT;
> + h.len = sizeof(*hh);
> + h.parent = parent;
> +
> + mutex_lock(&mm->context.lock);
> +
> + hh->ldt_entry_size = LDT_ENTRY_SIZE;
> + hh->nldt = mm->context.size;
> +
> + cr_debug("nldt %d\n", hh->nldt);
> +
> + ret = cr_write_obj(ctx, &h, hh);
> + cr_hbuf_put(ctx, sizeof(*hh));
> + if (ret < 0)
> + return ret;
mutex_unlock(&mm->context.lock) before return, I think?
> +
> + ret = cr_kwrite(ctx, mm->context.ldt, hh->nldt * LDT_ENTRY_SIZE);
> +
> + mutex_unlock(&mm->context.lock);
> +
> + return ret;
> +}
Vegard
--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
next prev parent reply other threads:[~2008-09-09 9:22 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 7:42 [RFC v4][PATCH 0/9] Kernel based checkpoint/restart` Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 1/9] Create syscalls: sys_checkpoint, sys_restart Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 2/9] General infrastructure for checkpoint restart Oren Laadan
2008-09-10 6:10 ` MinChan Kim
2008-09-10 18:36 ` Oren Laadan
2008-09-10 22:54 ` MinChan Kim
2008-09-11 6:44 ` Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 3/9] x86 support for checkpoint/restart Oren Laadan
2008-09-09 8:17 ` Ingo Molnar
2008-09-09 23:23 ` Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 4/9] Memory management (dump) Oren Laadan
2008-09-09 9:22 ` Vegard Nossum [this message]
2008-09-10 7:51 ` MinChan Kim
2008-09-10 23:49 ` MinChan Kim
2008-09-10 16:55 ` Dave Hansen
2008-09-10 17:45 ` Dave Hansen
2008-09-10 18:28 ` Oren Laadan
2008-09-10 21:03 ` Cleanups for [PATCH " Dave Hansen
2008-09-10 21:38 ` [RFC v4][PATCH " Dave Hansen
2008-09-12 16:57 ` Dave Hansen
2008-09-09 7:42 ` [RFC v4][PATCH 5/9] Memory managemnet (restore) Oren Laadan
2008-09-09 16:07 ` Serge E. Hallyn
2008-09-09 23:35 ` Oren Laadan
2008-09-10 15:00 ` Serge E. Hallyn
2008-09-10 19:31 ` Dave Hansen
2008-09-10 19:48 ` Oren Laadan
2008-09-10 20:49 ` Dave Hansen
2008-09-11 6:59 ` Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 6/9] Checkpoint/restart: initial documentation Oren Laadan
2008-09-10 7:13 ` MinChan Kim
2008-09-09 7:42 ` [RFC v4][PATCH 7/9] Infrastructure for shared objects Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 8/9] File descriprtors (dump) Oren Laadan
2008-09-09 8:06 ` Vegard Nossum
2008-09-09 8:23 ` Vegard Nossum
2008-09-10 2:01 ` Oren Laadan
2008-09-11 5:02 ` MinChan Kim
2008-09-11 6:37 ` Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 9/9] File descriprtors (restore) Oren Laadan
2008-09-09 16:26 ` Dave Hansen
2008-09-10 1:49 ` Oren Laadan
2008-09-10 16:09 ` Dave Hansen
2008-09-10 18:55 ` Oren Laadan
2008-09-09 18:06 ` [RFC v4][PATCH 0/9] Kernel based checkpoint/restart` Dave Hansen
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=19f34abd0809090222u68e90c74l514cd0b50a290d4b@mail.gmail.com \
--to=vegard.nossum@gmail.com \
--cc=arnd@arndb.de \
--cc=containers@lists.linux-foundation.org \
--cc=dave@linux.vnet.ibm.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orenl@cs.columbia.edu \
/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®