[CRIU] [PATCH 07/21] parasite: allocate stack for each thread
Pavel Emelyanov
xemul at parallels.com
Fri May 24 10:53:59 EDT 2013
On 05/24/2013 04:55 PM, Cyrill Gorcunov wrote:
> 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
> .
>
OK, thanks.
Applied
More information about the CRIU
mailing list