OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 1/6] Define and use task_active_pid_ns() wrapper
Re: [PATCH 1/6] Define and use task_active_pid_ns() wrapper [message #19327 is a reply to message #19174] Fri, 13 July 2007 06:03 Go to previous messageGo to previous message
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
Pavel Emelianov [xemul@openvz.org] wrote:
| sukadev@us.ibm.com wrote:
| > Subject: [PATCH 1/6] Define and use task_active_pid_ns() wrapper
| > 
| > From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
| > 
| > With multiple pid namespaces, a process is known by some pid_t in
| > every ancestor pid namespace.  Every time the process forks, the
| > child process also gets a pid_t in every ancestor pid namespace.
| > 
| > While a process is visible in >=1 pid namespaces, it can see pid_t's
| > in only one pid namespace.  We call this pid namespace it's "active
| > pid namespace", and it is always the youngest pid namespace in which
| > the process is known.
| > 
| > This patch defines and uses a wrapper to find the active pid namespace
| > of a process. The implementation of the wrapper will be changed in 
| > when support for multiple pid namespaces are added.
| > 
| > Changelog:
| > 	2.6.22-rc4-mm2-pidns1:
| > 	- [Pavel Emelianov, Alexey Dobriyan] Back out the change to use
| > 	  task_active_pid_ns() in child_reaper() since task->nsproxy
| > 	  can be NULL during task exit (so child_reaper() continues to
| > 	  use init_pid_ns).
| > 
| > 	  to implement child_reaper() since init_pid_ns.child_reaper to
| > 	  implement child_reaper() since tsk->nsproxy can be NULL during exit.
| > 
| > 	2.6.21-rc6-mm1:
| > 	- Rename task_pid_ns() to task_active_pid_ns() to reflect that a
| > 	  process can have multiple pid namespaces.
| > 
| > Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
| 
| Acked-by: Pavel Emelianov <xemul@openvz.org>
| 
| But I'm not sure Andrew will like the construction like
| 
| some_function()->xxx;
| 
| I used to do so in memory controller, but he asked to fix...

Hmm. I see this in the code: 

	rcu_dereference(p->real_parent)->tgid

Maybe rcu_deref is a spl case. Well, if Andrew complains, I
will add local vars as needed. I think its easier to read
with a wrapper than expanded out.

Thanks,

Suka
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Previous Topic: [PATCH 6/6] Define is_global_init() and is_container_init()
Next Topic: containers development plans (July 10 version)
Goto Forum:
  


Current Time: Fri Aug 16 06:10:32 GMT 2024

Total time taken to generate the page: 0.02847 seconds