OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH 06/14] Populate pid_nrs list with entry for init-pid-ns
Re: [RFC][PATCH 06/14] Populate pid_nrs list with entry for init-pid-ns [message #17931 is a reply to message #17912] Wed, 21 March 2007 09:38 Go to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
sukadev@us.ibm.com writes:
> Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
> Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
> ---
>  include/linux/pid.h |    9 ------
>  kernel/pid.c | 73 ++++++++++++++++++++++++++++++++++------------------
>  2 files changed, 50 insertions(+), 32 deletions(-)
>

> @@ -242,50 +247,70 @@ struct pid_nr *alloc_pid_nr(struct pid_n
>  	 */
>  	pid_nr->pid = pid;
>
> +	spin_lock_irq(&pidmap_lock);
> +	hlist_add_head_rcu(&pid_nr->pid_chain, &pid_hash[pid_hashfn(nr)]);
> +	spin_unlock_irq(&pidmap_lock);
> +

Hmm.  I think we really need to hash in some of the bits of the
pid_namespace so processes with identical pids don't get put on
the same hash chain.  It isn't critical but it is a good idea.

Eric
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: 2.6.20-lxc8 - compilation error
Next Topic: [RFC][PATCH 13/14] Define CLONE_NEWPID flag
Goto Forum:
  


Current Time: Wed Sep 24 14:46:17 GMT 2025

Total time taken to generate the page: 0.07675 seconds