[CRIU] [PATCH 07/21] parasite: allocate stack for each thread
Cyrill Gorcunov
gorcunov at openvz.org
Fri May 24 08:55:16 EDT 2013
On Fri, May 24, 2013 at 04:20:10PM +0400, Andrey Vagin wrote:
> It will be used for executed parasite as a daemon.
I believe more detailed comment will make Pavel more happy. In short
what we have previously -- the stack has been preallocated in parasite
blob itself and bootstrap procedure calculated the value needed for %rsp.
With this patch applied we provide every thread own stack as:
- find out how many threads are present
- calculate the summary size of all stacks
- when we ask dumpee to provide us memory area needed to run
parasite code, we pass summary size needed for everything
- when parasite code is asked to run we calculate %rsp needed
taking into account the thread number (ie offsets) and then
setup proper %rsp via ptrace call, instead of calculating it
in bootstrap parasite code
Cyrill
More information about the CRIU
mailing list