Messages in this thread | | | Date | Wed, 22 Oct 2008 12:44:48 +0200 | From | Louis Rilling <> | Subject | Re: [Devel] Re: [PATCH 08/10] Introduce functions to restart a process |
| |
On Wed, Oct 22, 2008 at 12:06:19PM +0200, Greg Kurz wrote: > On Wed, 2008-10-22 at 11:25 +0200, Louis Rilling wrote: > > Do you checkpoint uninterruptible syscalls as well? If only interruptible > > syscalls are checkpointed, I'd say that either this syscall uses ERESTARTSYS or > > ERESTART_RESTARTBLOCK, and then signal handling code already does the trick, or > > this syscall does not restart itself when interrupted, and well, this is life, > > userspace just sees -EINTR, which is allowed by the syscall spec. > > Actually this is how we checkpoint/migrate tasks in interruptible syscalls in > > Kerrighed and this works. > > > > Louis > > > > I don't know Kerrighed internals but I understand you perform checkpoint > with a signal handler. Right ?
Right. This is an kernel-internal-only signal, so all signals remain available for userspace.
> This approach has a huge benefit: the > signal handling code do all the arch dependant stuff to save registers > in user memory.
Hm, I'm not sure to understand what you mean here. We just rely on arch code that jumps to signal handling to correctly setup struct pt_regs, which is then passed to the checkpoint code. So yes, userspace registers are mostly saved by existing arch code. But in x86-64 for instance, segment registers still need to be saved by the checkpoint code (a bit like copy_thread() does), and I don't know arch-independent functions doing this.
Louis
-- Dr Louis Rilling Kerlabs Skype: louis.rilling Batiment Germanium Phone: (+33|0) 6 80 89 08 23 80 avenue des Buttes de Coesmes http://www.kerlabs.com/ 35700 Rennes [unhandled content-type:application/pgp-signature] | |