All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] Namespaces submenu
@ 2009-06-05 19:15 Dave Hansen
  2009-06-05 19:15 ` [PATCH 2/4] Move checkpoint closer to namespaces Dave Hansen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Dave Hansen @ 2009-06-05 19:15 UTC (permalink / raw)
  To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA; +Cc: Dave Hansen


Let's not steal too much space in the 'General Setup' menu.
Take a cue from the cgroups code and create a submenu.

This can go upstream now.

---

 linux-2.6.git-dave/init/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN init/Kconfig~namespaces-submenu init/Kconfig
--- linux-2.6.git/init/Kconfig~namespaces-submenu	2009-06-05 11:59:53.000000000 -0700
+++ linux-2.6.git-dave/init/Kconfig	2009-06-05 11:59:53.000000000 -0700
@@ -658,7 +658,7 @@ config RELAY
 
 	  If unsure, say N.
 
-config NAMESPACES
+menuconfig NAMESPACES
 	bool "Namespaces support" if EMBEDDED
 	default !EMBEDDED
 	help
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/4] Move checkpoint closer to namespaces
  2009-06-05 19:15 [PATCH 1/4] Namespaces submenu Dave Hansen
@ 2009-06-05 19:15 ` Dave Hansen
  2009-06-05 19:15 ` [PATCH 3/4] kill 'Enable' in c/r config option Dave Hansen
  2009-06-05 19:15 ` [PATCH 4/4] Conditionally force on namespaces Dave Hansen
  2 siblings, 0 replies; 7+ messages in thread
From: Dave Hansen @ 2009-06-05 19:15 UTC (permalink / raw)
  To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA; +Cc: Dave Hansen


These are pretty intimately related, so let's make them
closer to each other in Kconfig.  This shoudl be pushed
up into the patch that creates CONFIG_CHECKPOINT in the
first place.

---

 linux-2.6.git-dave/init/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN init/Kconfig~move-cr-close-to-namespaces init/Kconfig
--- linux-2.6.git/init/Kconfig~move-cr-close-to-namespaces	2009-06-05 11:45:19.000000000 -0700
+++ linux-2.6.git-dave/init/Kconfig	2009-06-05 11:57:46.000000000 -0700
@@ -709,6 +709,8 @@ config NET_NS
 	  Allow user space to create what appear to be multiple instances
 	  of the network stack.
 
+source "checkpoint/Kconfig"
+
 config BLK_DEV_INITRD
 	bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
 	depends on BROKEN || !FRV
@@ -1042,8 +1044,6 @@ config SLOW_WORK
 
 	  See Documentation/slow-work.txt.
 
-source "checkpoint/Kconfig"
-
 endmenu		# General setup
 
 config HAVE_GENERIC_DMA_COHERENT
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/4] kill 'Enable' in c/r config option
  2009-06-05 19:15 [PATCH 1/4] Namespaces submenu Dave Hansen
  2009-06-05 19:15 ` [PATCH 2/4] Move checkpoint closer to namespaces Dave Hansen
@ 2009-06-05 19:15 ` Dave Hansen
  2009-06-05 19:15 ` [PATCH 4/4] Conditionally force on namespaces Dave Hansen
  2 siblings, 0 replies; 7+ messages in thread
From: Dave Hansen @ 2009-06-05 19:15 UTC (permalink / raw)
  To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA; +Cc: Dave Hansen


We don't neeeed to say 'Enable'.  That's what Kconfig does
for everything. :)


---

 linux-2.6.git-dave/checkpoint/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN checkpoint/Kconfig~kill-Enabled checkpoint/Kconfig
--- linux-2.6.git/checkpoint/Kconfig~kill-Enabled	2009-06-05 11:46:01.000000000 -0700
+++ linux-2.6.git-dave/checkpoint/Kconfig	2009-06-05 11:57:46.000000000 -0700
@@ -7,7 +7,7 @@ config DEFERQUEUE
 	default n
 
 config CHECKPOINT
-	bool "Enable checkpoint/restart (EXPERIMENTAL)"
+	bool "Checkpoint/restart (EXPERIMENTAL)"
 	depends on CHECKPOINT_SUPPORT && EXPERIMENTAL
 	select DEFERQUEUE
 	help
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 4/4] Conditionally force on namespaces
  2009-06-05 19:15 [PATCH 1/4] Namespaces submenu Dave Hansen
  2009-06-05 19:15 ` [PATCH 2/4] Move checkpoint closer to namespaces Dave Hansen
  2009-06-05 19:15 ` [PATCH 3/4] kill 'Enable' in c/r config option Dave Hansen
@ 2009-06-05 19:15 ` Dave Hansen
  2009-06-05 19:35   ` Serge E. Hallyn
  2 siblings, 1 reply; 7+ messages in thread
From: Dave Hansen @ 2009-06-05 19:15 UTC (permalink / raw)
  To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA; +Cc: Dave Hansen


This should work around the compile issues that Nathan
pointed out yesterday.  It's too bad that 'select' is
such a blunt object.  We could surely use a soft select
or something.  But this hacks around it a bit.

Create a separate "*_NS_DEP" Kconfig option for the
dependencies for each namespace.  Make the real config
option and the c/r 'select' bot dependent on the new
common one.

This should at least keep compile errors from being
introduced.  Whether this is rude or not is a separate
questions. :)

---

 linux-2.6.git-dave/checkpoint/Kconfig |    6 ++++++
 linux-2.6.git-dave/init/Kconfig       |   30 +++++++++++++++++++++++++-----
 2 files changed, 31 insertions(+), 5 deletions(-)

diff -puN init/Kconfig~force-on-namespaces init/Kconfig
--- linux-2.6.git/init/Kconfig~force-on-namespaces	2009-06-05 12:00:06.000000000 -0700
+++ linux-2.6.git-dave/init/Kconfig	2009-06-05 12:14:22.000000000 -0700
@@ -667,32 +667,48 @@ menuconfig NAMESPACES
 	  or same user id or pid may refer to different tasks when used in
 	  different namespaces.
 
+config UTS_NS_DEP
+	def_bool y
+	depends on NAMESPACES
+
 config UTS_NS
 	bool "UTS namespace"
-	depends on NAMESPACES
+	depends on UTS_NS_DEP
 	help
 	  In this namespace tasks see different info provided with the
 	  uname() system call
 
+config IPC_NS_DEP
+	def_bool y
+	depends on NAMESPACES && (SYSVIPC || POSIX_MQUEUE)
+
 config IPC_NS
 	bool "IPC namespace"
-	depends on NAMESPACES && (SYSVIPC || POSIX_MQUEUE)
+	depends on IPC_NS_DEP
 	help
 	  In this namespace tasks work with IPC ids which correspond to
 	  different IPC objects in different namespaces.
 
+config USER_NS_DEP
+	def_bool y
+	depends on NAMESPACES && EXPERIMENTAL
+
 config USER_NS
 	bool "User namespace (EXPERIMENTAL)"
-	depends on NAMESPACES && EXPERIMENTAL
+	depends on USER_NS_DEP
 	help
 	  This allows containers, i.e. vservers, to use user namespaces
 	  to provide different user info for different servers.
 	  If unsure, say N.
 
+config PID_NS_DEP
+	def_bool y
+	depends on NAMESPACES && EXPERIMENTAL
+
 config PID_NS
 	bool "PID Namespaces (EXPERIMENTAL)"
 	default n
-	depends on NAMESPACES && EXPERIMENTAL
+	depends on PID_NS_DEP
 	help
 	  Support process id namespaces.  This allows having multiple
 	  processes with the same pid as long as they are in different
@@ -701,10 +717,14 @@ config PID_NS
 	  Unless you want to work with an experimental feature
 	  say N here.
 
+config NET_NS_DEP
+	def_bool y
+	depends on NAMESPACES && EXPERIMENTAL && NET
+
 config NET_NS
 	bool "Network namespace"
 	default n
-	depends on NAMESPACES && EXPERIMENTAL && NET
+	depends on NET_NS_DEP
 	help
 	  Allow user space to create what appear to be multiple instances
 	  of the network stack.
diff -puN checkpoint/Kconfig~force-on-namespaces checkpoint/Kconfig
--- linux-2.6.git/checkpoint/Kconfig~force-on-namespaces	2009-06-05 12:00:06.000000000 -0700
+++ linux-2.6.git-dave/checkpoint/Kconfig	2009-06-05 12:02:56.000000000 -0700
@@ -10,6 +10,12 @@ config CHECKPOINT
 	bool "Checkpoint/restart (EXPERIMENTAL)"
 	depends on CHECKPOINT_SUPPORT && EXPERIMENTAL
 	select DEFERQUEUE
+	select NAMESPACE
+	select UTS_NS if UTS_NS_DEP
+	select IPC_NS if IPC_NS_DEP
+	select NET_NS if NET_NS_DEP
+	select PID_NS if PID_NS_DEP
+	select USER_NS if USER_NS_DEP
 	help
 	  Application checkpoint/restart is the ability to save the
 	  state of a running application so that it can later resume
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/4] Conditionally force on namespaces
  2009-06-05 19:15 ` [PATCH 4/4] Conditionally force on namespaces Dave Hansen
@ 2009-06-05 19:35   ` Serge E. Hallyn
       [not found]     ` <20090605193538.GA22848-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Serge E. Hallyn @ 2009-06-05 19:35 UTC (permalink / raw)
  To: Dave Hansen; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

Quoting Dave Hansen (dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org):
> 
> This should work around the compile issues that Nathan
> pointed out yesterday.  It's too bad that 'select' is
> such a blunt object.  We could surely use a soft select
> or something.  But this hacks around it a bit.
> 
> Create a separate "*_NS_DEP" Kconfig option for the
> dependencies for each namespace.  Make the real config
> option and the c/r 'select' bot dependent on the new
> common one.
> 
> This should at least keep compile errors from being
> introduced.  Whether this is rude or not is a separate
> questions. :)

Yeah I'm not sure I'm a fan of this...

While I hate chasing down missing dependencies, maybe
CONFIG_CHECKPOINT should just depend on all the namespaces
instead of selecting them?

I'd assumed that was Nathan was really asking for, though
I could be wrong.

-serge

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/4] Conditionally force on namespaces
       [not found]     ` <20090605193538.GA22848-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2009-06-05 21:21       ` Nathan Lynch
  2009-06-08  6:21       ` Oren Laadan
  1 sibling, 0 replies; 7+ messages in thread
From: Nathan Lynch @ 2009-06-05 21:21 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Dave Hansen

"Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> writes:
> Quoting Dave Hansen (dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org):
>> 
>> This should work around the compile issues that Nathan
>> pointed out yesterday.  It's too bad that 'select' is
>> such a blunt object.  We could surely use a soft select
>> or something.  But this hacks around it a bit.
>> 
>> Create a separate "*_NS_DEP" Kconfig option for the
>> dependencies for each namespace.  Make the real config
>> option and the c/r 'select' bot dependent on the new
>> common one.
>> 
>> This should at least keep compile errors from being
>> introduced.  Whether this is rude or not is a separate
>> questions. :)
>
> Yeah I'm not sure I'm a fan of this...
>
> While I hate chasing down missing dependencies, maybe
> CONFIG_CHECKPOINT should just depend on all the namespaces
> instead of selecting them?
>
> I'd assumed that was Nathan was really asking for, though
> I could be wrong.

I was mainly interested in preventing build breaks.  :)

While Oren's checkpoint implementation is useful with any combination of
the *_NS config options, ensuring that the kernel builds and functions
correctly with all the permutations looks non-trivial.  Making
CHECKPOINT depend on all the *_NS options looks like an easy way to
avoid the mess.  Dave's patches seem to provide the maximum amount of
flexibility, but my suspicion is that most interested parties tend to
turn on all of *_NS anyway (as distros are starting to do), and that
other configurations (e.g. CHECKPOINT=y, NET_NS=n) simply won't get
test coverage in practice.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/4] Conditionally force on namespaces
       [not found]     ` <20090605193538.GA22848-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  2009-06-05 21:21       ` Nathan Lynch
@ 2009-06-08  6:21       ` Oren Laadan
  1 sibling, 0 replies; 7+ messages in thread
From: Oren Laadan @ 2009-06-08  6:21 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Dave Hansen



Serge E. Hallyn wrote:
> Quoting Dave Hansen (dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org):
>> This should work around the compile issues that Nathan
>> pointed out yesterday.  It's too bad that 'select' is
>> such a blunt object.  We could surely use a soft select
>> or something.  But this hacks around it a bit.
>>
>> Create a separate "*_NS_DEP" Kconfig option for the
>> dependencies for each namespace.  Make the real config
>> option and the c/r 'select' bot dependent on the new
>> common one.
>>
>> This should at least keep compile errors from being
>> introduced.  Whether this is rude or not is a separate
>> questions. :)
> 
> Yeah I'm not sure I'm a fan of this...
> 
> While I hate chasing down missing dependencies, maybe
> CONFIG_CHECKPOINT should just depend on all the namespaces
> instead of selecting them?
> 

Current c/r can work without namespaces - it should not
depend on CONFIG_NAMESPACE (though it can suggest).

Oren.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-06-08  6:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-05 19:15 [PATCH 1/4] Namespaces submenu Dave Hansen
2009-06-05 19:15 ` [PATCH 2/4] Move checkpoint closer to namespaces Dave Hansen
2009-06-05 19:15 ` [PATCH 3/4] kill 'Enable' in c/r config option Dave Hansen
2009-06-05 19:15 ` [PATCH 4/4] Conditionally force on namespaces Dave Hansen
2009-06-05 19:35   ` Serge E. Hallyn
     [not found]     ` <20090605193538.GA22848-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-05 21:21       ` Nathan Lynch
2009-06-08  6:21       ` Oren Laadan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.