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

Pavel Emelyanov xemul at parallels.com
Fri Mar 1 14:50:59 EST 2013


On 03/01/2013 11:49 PM, Cyrill Gorcunov wrote:
> 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.
>>From crtools code you simply use pids of threads all the time and don't need
> to share anything. 

So id == pid.real?

> Or I miss something fundamental here?
> .
> 




More information about the CRIU mailing list