OpenVZ Forum


Home » Mailing lists » Devel » [Lxc-devel] [RFC] [PATCH] pidspace: is_init()
Re: [Lxc-devel] [RFC] [PATCH] pidspace: is_init() [message #16532 is a reply to message #16528] Wed, 09 August 2006 08:01 Go to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
Sukadev Bhattiprolu <sukadev@us.ibm.com> writes:

> This is an updated version of Eric Biederman's is_init() patch.
> (http://lkml.org/lkml/2006/2/6/280). It applies cleanly to 2.6.18-rc2
> and replaces a few more instances of ->pid == 1 with is_init().
>
> Further, is_init() checks pid and thus removes dependency on Eric's
> other patches for now.

Sorry for the delay.  I've been catching up on other things before
I dived back in.

> Couple of questions:
>
> 	Are there cases where child_reaper is not pid = 1. Should the
> 	"tsk == child_reaper" check in do_exit() be replaced with is_init() ? 

There are cases where there are multiple child_reapers.
So is_init() is not the right test there.

There is a really weird case when you have a threaded init and the primary
thread exits where things get weird.  As I recall there wind up being two
tasks with tgid == 1 and pid == 1.  So simply testing the pid is not
sufficient.

> 	Looks like, we would need a similar, is_idle() wrapper for "pid==0"
> 	checks - although the name is_idle_task() maybe more intuitive. If
> 	so, should we rename is_init() to is_init_task() ? 

Whatever works.  I'm not too particular as long as the important bits happen.
However pid == 0 only ever lives in the root pspace and never shows up in
the pid hash tables so we can get away without a special check.

Eric

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel
 
Read Message
Read Message
Previous Topic: [Lxc-devel] + pidspace-is_init.patch added to -mm tree
Next Topic: Re: [Lxc-devel] [PATCH] pidspace: is_init()
Goto Forum:
  


Current Time: Mon Sep 16 14:08:06 GMT 2024

Total time taken to generate the page: 0.04557 seconds