[lkml]   [2011]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/3] pids: Make it possible to clone tasks with given pids
On 11/10/2011 09:45 PM, Tejun Heo wrote:
> Hello,
> On Thu, Nov 10, 2011 at 09:36:07PM +0400, Pavel Emelyanov wrote:
>>> Hmmm... is it necessary to be able to replicate pids on all
>>> namespaces?
>> Not for us (I mean OpenVZ). But since we should (in theory) be able to
>> recreate the nested set of namespaces it would be good if the API allows
>> for this from the very beginning.
> I see.
>>> Also, isn't it a bit weird to be able to request PIDs in
>>> the namespaces which is beyond the task which requested cloning?
>> It is, but the last_pid != 0 check will abort this request with EPERM :)
>> Do you think some other behavior would be better?
> Right, missed that part. The only suggestion then is that clearing
> wants_pid to NULL isn't an optimization but should be part of API -
> ie. want_pids is 0 terminated; otherwise, the caller must know at
> which ns depth it is.

Mm... I don't understand your concern.

If the want_pid[n] == 0 at some n value the further pid numbers should be
generated, not set. I can NOT set want_pid to NULL here, but keep it point
to the n'th array member, but this will make the code go through the
get_user() again and again. This want_pid = NULL is just to make the first
if (want_pid == NULL) check work.

> Thanks.

 \ /
  Last update: 2011-11-11 11:07    [W:0.057 / U:4.044 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site