Re: RFC [patch 13/34] PID Virtualization Define new task_pid api

From: Alan Cox
Date: Mon Jan 23 2006 - 19:20:33 EST


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.

> 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.

Alan

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