[CRIU] [PATCH 01/10] pstree: Bind CoreEntry to pstree and fill it with registers early

Cyrill Gorcunov gorcunov at openvz.org
Mon Mar 4 07:53:09 EST 2013


When parasite daemon mode will be implemented we get deprived of ability
to fetch registers at the late moment of dumping as we were, thus just
bind CoreEntry to pstree item and allocate CoreEntry'ies for every
thread found, once process tree is in seized state.

Then immediately fill CoreEntry'ies with registers. We use prctl
opcode for that but fetch a complete set of registers including
FPU state, and convert them into protobuf format.

Zombie tasks remains untouched, we allocate CoreEntry for them
right at moment of dumping becuase we don't need registers there
to be written on disk.

This way get_task_regs no longer need parasite_ctl argument
and it's zapped.

Still parasite_ctl has own copy of general registers set but
this is because we need them to be in cpu native format unlike
ones kept in CoreEntry.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 arch/arm/crtools.c          |  12 ++---
 arch/arm/include/asm/dump.h |   2 +-
 arch/x86/crtools.c          |  12 ++---
 arch/x86/include/asm/dump.h |   2 +-
 cr-dump.c                   | 116 ++++++++++++++++----------------------------
 include/pstree.h            |   5 ++
 pstree.c                    |  70 ++++++++++++++++++++++++++
 7 files changed, 128 insertions(+), 91 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-pstree-Bind-CoreEntry-to-pstree-and-fill-it-with-reg.patch
Type: text/x-patch
Size: 11287 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130304/6c8b4991/attachment-0001.bin>


More information about the CRIU mailing list