OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH 0/5] Remove nsproxy->pid_ns
[RFC][PATCH 0/5] Remove nsproxy->pid_ns [message #17658] Sat, 10 March 2007 04:00
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Subject [RFC][PATCH 0/5] Remove nsproxy->pid_ns

We need to decouple pid namespace from nsproxy to allow getting and
releasing pid namespace independently from other namespaces. This is
required since a process's reference to its pid namespace must exist
even after its references to other namespaces are dropped during
process exit.

This patchset accomplishes this by using the pid->pid_nrs list defined
in earlier patches. As noted from that patchset, pid->pid_nrs list
allows each process to have multiple pid_t values, one per each namespace.

We define a task's clone-pid-namespace as the pid namespace that the
process last unshared into. If the process never unshared its pid namespace,
then its clone-pid-namespace is same as its parent clone-pid-namespace
(possibly init-pid-ns), when the process was created.

When a process unshares its pid namespace, we allocate a new struct pid_nr
and attach this pid_nr at the head of the pid->pid_nrs list.

The task_pid_ns() wrapper always returns this clone-pid-ns of the task
and returns the pid namespace from the head of the pid->pid_nrs list.

This patch set includes following 5 patches:

[PATCH 1/5]
	Rename *namespaces() functions to *nsproxy() to reflect that
	these functions only operate on an nsproxy and not on all
	namespaces.

[PATCH 2/5]
	Define helper functions to use as we move pid namespace out of
	nsproxy 

[PATCH 3/5]
	Use pid_namespace in struct pid_nr rather than nsproxy->pid_ns.

[PATCH 4/5]
	Remove the struct pid_namespace * from struct nsproxy

[PATCH 5/5]
	Remove the now-unused function, copy_pid_ns().


Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: containers@lists.osdl.org
---
_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
Previous Topic: [RFC][PATCH 2/6] Reimplement pid_nr() using struct pid_nr
Next Topic: [RFC][PATCH 1/5]: Rename namespaces functions
Goto Forum:
  


Current Time: Sun Aug 10 20:02:25 GMT 2025

Total time taken to generate the page: 0.10090 seconds