But our VPID patch is much less intrusive and shorter (thanks to Alexey Kuznetsov).The virtual pid is different depending on who is asking. So simply
storing current->realpid and current->pid isn't helpful, as we would
still need to call a function when a pid crosses user->kernel boundary.
This is an obscure, weird piece of functionality for some special case
usages most of which are going to be eliminated by Xen. I don't see the
kernel side justification for it at all.
At least OpenVZ and vserver want very similar functionality. They're
both working with out-of-tree patch sets. We each want to do subtly
different things with tsk->pid, and task_pid() seemed to be a decent
place to start. OpenVZ has a very similar concept in its pid_task()
function.
Arjan had a very good point last time we posted these: we should
consider getting rid of as many places in the kernel where pids are used
to uniquely identify tasks, and just stick with task_struct pointers.