[Devel] [PATCH] Enhance checkpoint/restart Kconfig options

Dave Hansen dave at linux.vnet.ibm.com
Thu Jun 4 11:45:04 PDT 2009


I spent way too much time yesterday trying to figure out why
my c/r tests weren't running.  It turned out that I didn't
have any of the namespaces enabled, the sys_unshare() was
failing, and the debugging didn't explain any of this.

So, to protect the world from repeating my mistakes, let's
improve the Kconfig options a bit.

1. Don't say "Enable" in the c/r menu, that's just silly
2. move the c/r menu next to the namespaces
3. make CHECKPOINT select all of the namespaces
4. put a Kconfig 'comment' in explaining how everything
   got selected.
5. Put the namespaces in their own menu

Perhaps I should break this up a bit and we can push some
of this to the beginning of the series.  Thoughts?

---

 linux-2.6.git-dave/checkpoint/Kconfig |    7 ++++++-
 linux-2.6.git-dave/init/Kconfig       |    9 ++++++---
 2 files changed, 12 insertions(+), 4 deletions(-)

diff -puN checkpoint/Kconfig~cr-kconfig-fixup checkpoint/Kconfig
--- linux-2.6.git/checkpoint/Kconfig~cr-kconfig-fixup	2009-06-04 11:38:57.000000000 -0700
+++ linux-2.6.git-dave/checkpoint/Kconfig	2009-06-04 11:38:57.000000000 -0700
@@ -7,9 +7,14 @@ config DEFERQUEUE
 	default n
 
 config CHECKPOINT
-	bool "Enable checkpoint/restart (EXPERIMENTAL)"
+	bool "Checkpoint/restart (EXPERIMENTAL)"
 	depends on CHECKPOINT_SUPPORT && EXPERIMENTAL
 	select DEFERQUEUE
+	select UTS_NS
+	select IPC_NS
+	select NET_NS
+	select PID_NS
+	select USER_NS
 	help
 	  Application checkpoint/restart is the ability to save the
 	  state of a running application so that it can later resume
diff -puN init/Kconfig~cr-kconfig-fixup init/Kconfig
--- linux-2.6.git/init/Kconfig~cr-kconfig-fixup	2009-06-04 11:38:57.000000000 -0700
+++ linux-2.6.git-dave/init/Kconfig	2009-06-04 11:41:43.000000000 -0700
@@ -658,7 +658,7 @@ config RELAY
 
 	  If unsure, say N.
 
-config NAMESPACES
+menuconfig NAMESPACES
 	bool "Namespaces support" if EMBEDDED
 	default !EMBEDDED
 	help
@@ -667,6 +667,9 @@ config NAMESPACES
 	  or same user id or pid may refer to different tasks when used in
 	  different namespaces.
 
+comment "These options are forced on by Checkpoint/restart"
+	depends on NAMESPACES && CHECKPOINT
+
 config UTS_NS
 	bool "UTS namespace"
 	depends on NAMESPACES
@@ -709,6 +712,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 +1047,6 @@ config SLOW_WORK
 
 	  See Documentation/slow-work.txt.
 
-source "checkpoint/Kconfig"
-
 endmenu		# General setup
 
 config HAVE_GENERIC_DMA_COHERENT
diff -puN scripts/kconfig/mconf.c~cr-kconfig-fixup scripts/kconfig/mconf.c
diff -puN scripts/kconfig/symbol.c~cr-kconfig-fixup scripts/kconfig/symbol.c
_
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list