Checkpoint / Restart
Hello,
i'm searching for the right Mailing List for Linux checkpoint / restart.
I'm working for the XtreemOS Project (http://www.xtreemos.eu). We want to include the linux native checkpoint / restart, but it seems to not work. I tested it with the delivered test applications, but they don't work. The restart application (rstr) throws a segmentation fault. I tried both tests from the documentation, checkpointing self and checkpoint from another process. My Architecture is a Pentium D.
Sorry if this is the wrong Mailing List, i couldn't find the right place (forum or mailing list).
Thanks for Help,
Regards,
Ralph-Gordon Paul
A message that is not in the archive (sent off-list or not yet received): EF0F4DD0-96C2-47CF-A247-19002A3BD53B-4bfl1RV3iZDOEhgYWvzSCYQuADTiUCJX@public.gmane.org
Quoted 11 lines · Ralph-Gordon Paul
Hello,
i'm searching for the right Mailing List for Linux checkpoint / restart.
I'm working for the XtreemOS Project (http://www.xtreemos.eu). We want to include the linux native checkpoint / restart, but it seems to not work. I tested it with the delivered test applications, but they don't work. The restart application (rstr) throws a segmentation fault. I tried both tests from the documentation, checkpointing self and checkpoint from another process. My Architecture is a Pentium D.
Quoted 4 lines
Sorry if this is the wrong Mailing List, i couldn't find the right place (forum or mailing list).
Thanks for Help,
Hi,
Yup, this is the right list - well either this or lkml.
IIUC you're saying you tested this on a 64-bit x86. That is in fact not yet supported. With Oren's patchset, you can only use x86_32. (With the patch I sent last week, you could also do s390x.) Support for x86_64 shouldn't take much work - I think Dave was going to see about such a port, and Oren may have one at the ready, but you could also do it yourself if you're so inclined.
-serge
A message that is not in the archive (sent off-list or not yet received): 20090127155947.GB10039-r/[email protected]
RFC PATCH 1/1 x86_86 support of checkpoint/restart (Re: Checkpoint / Restart)
Hi,
I'm now working on porting to x86_64 with help from Nauman Rafique. Here is the preliminary patch. If there is someone who is interested in x86_64 support, please join.
This patch is to support x86_64 on Oren's checkpoint/restart patchset (v12 on December 29th). His patchset is well implemented, so the x86_64 patch is only handling architecture specific registers. (Maybe I'm missing something important...)
I've tested this patch with his test suite (self.c and rstr.c) but I'm not confident especially in handling segment registers (%fs/%gs).
This patch doesn't support external checkpointing, nor 32bit binary checkpoint/restart on 64bit Linux.
I would appreciate any comments and feedback.
Thanks,
Masahiko.
In article <20090127155947.GB10039-r/[email protected]>
Quoted 21 lines · serue-r/[email protected] wrote:
Quoted 11 lines · Ralph-Gordon Paul
Hello,
i'm searching for the right Mailing List for Linux checkpoint / restart.
I'm working for the XtreemOS Project (http://www.xtreemos.eu). We want to include the linux native checkpoint / restart, but it seems to not work. I tested it with the delivered test applications, but they don't work. The restart application (rstr) throws a segmentation fault. I tried both tests from the documentation, checkpointing self and checkpoint from another process. My Architecture is a Pentium D.
Quoted 4 lines
Sorry if this is the wrong Mailing List, i couldn't find the right place (forum or mailing list).
Thanks for Help,
Hi,
Yup, this is the right list - well either this or lkml.
Quoted 7 lines
IIUC you're saying you tested this on a 64-bit x86. That is in fact not yet supported. With Oren's patchset, you can only use
x86_32. (With the patch I sent last week, you could also do s390x.) Support forx86_64shouldn't take much work - I think Dave was going to see about such a port, and Oren may have one at the ready, but you could also do it yourself if you're so inclined.
Against Oren's patchset v12.
ToDo;
1. support external checkpoint (Nauman Rafique is working now)
2. support 32bit binary checkpoint/restart on 64bit Linux
--- arch/x86/include/asm/unistd_64.h | 4 +++ arch/x86/mm/checkpoint.c | 47 ++++++++++++++++++++++++++++++------- arch/x86/mm/restart.c | 29 +++++++++++++++++------ checkpoint/Kconfig | 2 +- 4 files changed, 64 insertions(+), 18 deletions(-)
arch/x86/include/asm/unistd_64.h +4 -0
@@ -653,6 +653,10 @@ __SYSCALL(__NR_dup3, sys_dup3) __SYSCALL(__NR_pipe2, sys_pipe2)#define __NR_inotify_init1 294 __SYSCALL(__NR_inotify_init1, sys_inotify_init1) +#define __NR_checkpoint 295 +__SYSCALL(__NR_checkpoint, sys_checkpoint) +#define __NR_restart 296 +__SYSCALL(__NR_restart, sys_restart)#ifndef __NO_STUBS
arch/x86/mm/checkpoint.c +38 -9
87 lines not on this page · raw message
arch/x86/mm/restart.c +21 -8
@@ -10,6 +10,8 @@#include <asm/desc.h> #include <asm/i387.h> +#include <asm/prctl.h> +#include <asm/proto.h> #include <linux/checkpoint.h> #include <linux/checkpoint_hdr.h>
@@ -77,12 +79,6 @@ int cr_read_thread(struct cr_ctx *ctx)return ret; } -#ifdef CONFIG_X86_64 - -#error "CONFIG_X86_64 unsupported yet." - -#else /* !CONFIG_X86_64 */ -static int cr_load_cpu_regs (struct cr_hdr_cpu *hh,struct task_struct *t) {struct thread_struct *thread = &t->thread;
@@ -95,19 +91,38 @@ static int cr_load_cpu_regs(struct cr_hdr_cpu *hh, struct task_struct *t) regs->di = hh->di; regs->bp = hh->bp; regs->ax = hh->ax; +#ifdef CONFIG_X86_64 + regs->r8 = hh->r8; + regs->r9 = hh->r9; + regs->r10 = hh->r10; + regs->r11 = hh->r11; + regs->r12 = hh->r12; + regs->r13 = hh->r13; + regs->r14 = hh->r14; + regs->r15 = hh->r15; + thread->ds = hh->ds; + thread->es = hh->es; +#else regs->ds = hh->ds; regs->es = hh->es; +#endif /* CONFIG_X86_64 */ regs->orig_ax = hh->orig_ax; regs->ip = hh->ip; regs->cs = hh->cs; regs->flags = hh->flags; regs->sp = hh->sp; +write_pda (oldrsp, hh->sp); regs->ss = hh->ss; thread->gs = hh->gs; thread->fs = hh->fs; +#ifdef CONFIG_X86_64 +do_arch_prctl (t,ARCH_SET_FS , hh->fs); +do_arch_prctl (t,ARCH_SET_GS , hh->gs); +#else loadsegment (gs, hh->gs);loadsegment (fs, hh->fs); +#endif return 0 ; }
@@ -166,8 +181,6 @@ static int cr_read_cpu_fpu(struct cr_ctx *ctx, struct task_struct *t)return 0 ; } -#endif /* CONFIG_X86_64 */ -/* read the cpu state and registers for the current task */ int cr_read_cpu (struct cr_ctx *ctx) {
checkpoint/Kconfig +1 -1
@@ -1,7 +1,7 @@ config CHECKPOINT_RESTART prompt "Enable checkpoint/restart (EXPERIMENTAL)" def_bool n - depends on X86_32 && EXPERIMENTAL + depends on X86 && EXPERIMENTAL help Application checkpoint/restart is the ability to save the state of a running application so that it can later resume
Signature · 1 line
1.5.2.5
A message that is not in the archive (sent off-list or not yet received): 090128111035.M0106630-n+Fz6uxiQ6t02ytvwG4l7tBPR1lH4CV8@public.gmane.org
Re: [RFC][PATCH] x86_86 support of checkpoint/restart (Re: Checkpoint / Restart)
Quoted 5 lines · Masahiko Takahashi
Hi,
I'm now working on porting to
x86_64with help from Nauman Rafique. Here is the preliminary patch. If there is someone who is interested inx86_64support, please join.
Cool. Looks nice and minimal. Thanks for doing this.
Quoted 9 lines
This patch is to support
x86_64on Oren's checkpoint/restart patchset (v12 on December 29th). His patchset is well implemented, so thex86_64patch is only handling architecture specific registers. (Maybe I'm missing something important...)I've tested this patch with his test suite (
self.candrstr.c) but I'm not confident especially in handling segment registers (%fs/%gs).This patch doesn't support external checkpointing, nor 32bit binary
Heh, and I just realized that my s390 port doesn't do self-checkpoint, I'd only been doing external. Oops.
Quoted 3 lines
checkpoint/restart on 64bit Linux.
I would appreciate any comments and feedback.
-serge
A message that is not in the archive (sent off-list or not yet received): 20090128215902.GA5635-r/[email protected]
Re: [RFC][PATCH] x86_86 support of checkpoint/restart (Re: Checkpoint / Restart)
Hi Serge,
Thank you for the comment.
I have checked the patch works on the Oren's latest patchset(v13) also.
And, ... I notice the email's subject was incorrect. Oops. As you know, "x86_64 support" is correct.
Thanks,
Masahiko.
Quoted 27 lines · Serge E. Hallyn
Quoted 5 lines · Masahiko Takahashi
Hi,
I'm now working on porting to
x86_64with help from Nauman Rafique. Here is the preliminary patch. If there is someone who is interested inx86_64support, please join.Cool. Looks nice and minimal. Thanks for doing this.
Quoted 9 lines
This patch is to support
x86_64on Oren's checkpoint/restart patchset (v12 on December 29th). His patchset is well implemented, so thex86_64patch is only handling architecture specific registers. (Maybe I'm missing something important...)I've tested this patch with his test suite (
self.candrstr.c) but I'm not confident especially in handling segment registers (%fs/%gs).This patch doesn't support external checkpointing, nor 32bit binary
Heh, and I just realized that my s390 port doesn't do self-checkpoint, I'd only been doing external. Oops.
Quoted 3 lines
checkpoint/restart on 64bit Linux.
I would appreciate any comments and feedback.
-serge
Re: [RFC][PATCH] x86_86 support of checkpoint/restart (Re: Checkpoint / Restart)
In reply to a message not in the archiveQuoted 3 lines · Masahiko Takahashi
I'm now working on porting to
x86_64with help from Nauman Rafique. Here is the preliminary patch. If there is someone who is interested inx86_64support, please join.
Do you have anything more recent than this? I think there are a few cleanups we can add to get rid of some of the #ifdef mess.
-- Dave
Re: [RFC][PATCH] x86_86 support of checkpoint/restart (Re: Checkpoint / Restart)
Hi Dave,
Actually, that was the latest patch I made. You're right, it needs cleanups and I'm sorry for using #ifdefs.
If there is anything I can do, please let me know.
Thanks,
Masahiko.
Quoted 7 lines · Dave Hansen
Quoted 3 lines · Masahiko Takahashi
I'm now working on porting to
x86_64with help from Nauman Rafique. Here is the preliminary patch. If there is someone who is interested inx86_64support, please join.Do you have anything more recent than this? I think there are a few cleanups we can add to get rid of some of the #ifdef mess.