[Devel] Re: [RFC][PATCH 06/14] Populate pid_nrs list with entry for init-pid-ns
Eric W. Biederman
ebiederm at xmission.com
Wed Mar 21 02:38:14 PDT 2007
sukadev at us.ibm.com writes:
> Signed-off-by: Cedric Le Goater <clg at fr.ibm.com>
> Signed-off-by: Sukadev Bhattiprolu <sukadev at 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 at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list