[CRIU] [PATCH 07/12] parasite: Extend tid_state_s structure

Cyrill Gorcunov gorcunov at openvz.org
Fri Mar 1 14:49:56 EST 2013


On Fri, Mar 01, 2013 at 11:45:18PM +0400, Pavel Emelyanov wrote:
> On 03/01/2013 11:31 PM, Cyrill Gorcunov wrote:
> > On Fri, Mar 01, 2013 at 10:51:19PM +0400, Pavel Emelyanov wrote:
> >>> diff --git a/pie/parasite.c b/pie/parasite.c
> >>> index 3b2617c..c8b5f60 100644
> >>> --- a/pie/parasite.c
> >>> +++ b/pie/parasite.c
> >>> @@ -20,9 +20,11 @@ static int tsock = -1;
> >>>  static int ctlsock = -1;
> >>>  
> >>>  static struct tid_state_s {
> >>> +	unsigned int	id;
> >>
> >> Isn't tid good enough to address thread? Why?
> > 
> > We don't know tids at moment when we inject parasite code (especially
> > when we dump in namespaces, we have
> 
> You map id to tid anyway, why not just use it all over the workflow?

No, id is the tid in crtools namespace, while tid inside tid_state_s --
it's tid of thread inside parasite namespace. Again, I used it before,
but it required me to share tid_state_s slab between crtools and parasite
code, which in turn added more data into the code, so I see no benefit here.


More information about the CRIU mailing list