lkml.org 
[lkml]   [2006]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: RFC [patch 13/34] PID Virtualization Define new task_pid api
From
Date
Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

> On Llu, 2006-01-23 at 14:30 -0700, Eric W. Biederman wrote:
>> The short observation is currently we use at most 22bits of the pid
>> space, and we don't need a huge number of containers so combining them
>> into one integer makes sense for an efficient implementation, and it
>> is cheaper than comparing pointers.
>
> Currently. In addition it becomes more costly the moment you have to
> start masking them. Remember the point of this was to virtualise the
> pid, so you are going to add a ton of masking versus a cheap extra
> comparison from the same cache line. And you lose pid space you may well
> need in the future for the sake of a quick hack.

I do disagree that as I am envisioning it will get in the way but I
do agree that putting them in the unsigned long may be overkill.

There is at least NFS lockd that appreciates having a single integer
per process unique identifier. So there is a practical basis for
wanting such a thing.

At least for this first round I think talking about a kpid
as a container, pid pair makes a lot of sense for the moment, as
the other implementations just confuse things.

>> And there will be at least one processes id assigned to the pid space
>> from the outside pid space unless we choose to break waitpid, and friends.
>
> That comes out in the wash because it is already done by process tree
> pointers anyway. It has to be because using ->ppid would be racy.

Possibly. Again, it is one of the more interesting cases, to get
just right.

However it looks to me that the biggest challenge right now about
development is the size of a patch to change any one of these things.
So it looks to me like the first step is to add wrappers for common idioms
that use pids, like printing the name of a task or testing if it is the
init task or if it is an idle task.

Or can you think of a case where it would be wise to leave
both the type and size of current->pid alone?

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-24 20:30    [W:0.120 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site