[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F0DD365.6070200@parallels.com>
Date: Wed, 11 Jan 2012 22:22:29 +0400
From: Pavel Emelyanov <xemul@...allels.com>
To: KOSAKI Motohiro <kosaki.motohiro@...il.com>
CC: Cyrill Gorcunov <gorcunov@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Kyle Moffett <kyle@...fetthome.net>, Tejun Heo <tj@...nel.org>,
Glauber Costa <glommer@...allels.com>,
Andi Kleen <andi@...stfloor.org>,
Matt Helsley <matthltc@...ibm.com>,
Pekka Enberg <penberg@...nel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Vasiliy Kulikov <segoon@...nwall.com>,
Alexey Dobriyan <adobriyan@...il.com>,
Herbert Xu <herbert@...dor.hengli.com.au>,
"David S. Miller" <davem@...emloft.net>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Andrey Vagin <avagin@...nvz.org>
Subject: Re: [RFC] on general object IDs again
On 01/11/2012 10:19 PM, KOSAKI Motohiro wrote:
>> Hi Kosaki,
>>
>> the idea on user-space is something like
>>
>> - collect all pids to dump
>> - collect IDs for every pid
>> - sort the IDs obtained
>> - find the same IDs (which will be kind of find intersections in a sets of IDs) and
>> set up CLONE_ flags on restore procedure as appropriate (for example if
>> GEN_OBJ_ID_VM IDs for two or more tasks are the same we need to use CLONE_VM
>> at restore time, and so on).
>
> Then, you only need to compare. not any other calculation. i.e. only
> need id uniqueness.
> And any resource are referenced from tasks. so, can you reuse pid for
> this? example,
> two taska share one mm.
>
> task-a(pid: 100)
> |-----------------mm
> task-b(pid: 200)
>
>
> gen_obj_id(task-b, GEN_OBJ_ID_VM) return 100. (youngest pid of referenced tasks)
We can, but determining the youngest pid for an mm struct is O(N) algo.
Having N tasks with N mm_structs getting the sharing picture becomes O(N^2).
> .
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists