Skip to contentSkip to conversation

Enhance checkpoint/restart Kconfig options

PATCH Nathan Lynch 4 participants 6 messages Jun 4, 2009 – Jun 5, 2009 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20090604184504.F1BCB2F8@kernel

#1 lore raw
Quoted 30 lines · Dave Hansen

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

checkpoint/Kconfig renamed from checkpoint/Kconfig~cr-kconfig-fixup +0 -0
@@ -7,9 +7,14 @@ config DEFERQUEUE
 	default n
 

checkpoint/Kconfig config DEFERQUEUE · line 17

Quoted 10 lines
checkpoint/Kconfig renamed from checkpoint/Kconfig~cr-kconfig-fixup +6 -1
 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

*_NS all depend on NAMESPACES at the very least; some have additional dependencies. Selecting a symbol without ensuring its dependencies are enabled is one way to break a build.

Also - checkpoint is useful without *_NS, no? Forcing these things on seems a little user-hostile..

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 7 lines · Nathan Lynch
Quoted 6 lines · Dave Hansen

diff -puN checkpoint/Kconfig~cr-kconfig-fixup checkpoint/Kconfig

checkpoint/Kconfig renamed from checkpoint/Kconfig~cr-kconfig-fixup +0 -0
@@ -7,9 +7,14 @@ config DEFERQUEUE
 	default n
 
Quoted 14 lines

checkpoint/Kconfig config DEFERQUEUE · line 17

Quoted 10 lines
checkpoint/Kconfig renamed from checkpoint/Kconfig~cr-kconfig-fixup +6 -1
 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

*_NS all depend on NAMESPACES at the very least; some have additional dependencies. Selecting a symbol without ensuring its dependencies are enabled is one way to break a build.

Ahh, but there *isn't* a strict build dependency on them. We just want to make sure that if they're available that we enable them. If we have CONFIG_NET=n, then we certainly don't want to make CHECKPOINT depends on it.

Quoted 2 lines

Also - checkpoint is useful without *_NS, no? Forcing these things on seems a little user-hostile..

I think the hostile thing is trying to completely unshare all the namespaces without checking to see which ones are enabled, first. ;)

-- Dave

#4 lore raw
Quoted 22 lines · Dave Hansen
Quoted 7 lines · Nathan Lynch
Quoted 6 lines · Dave Hansen

diff -puN checkpoint/Kconfig~cr-kconfig-fixup checkpoint/Kconfig

checkpoint/Kconfig renamed from checkpoint/Kconfig~cr-kconfig-fixup +0 -0
@@ -7,9 +7,14 @@ config DEFERQUEUE
 	default n
 
Quoted 13 lines

checkpoint/Kconfig config DEFERQUEUE · line 17

Quoted 10 lines
checkpoint/Kconfig renamed from checkpoint/Kconfig~cr-kconfig-fixup +6 -1
 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

*_NS all depend on NAMESPACES at the very least; some have additional dependencies. Selecting a symbol without ensuring its dependencies are enabled is one way to break a build.

Quoted 7 lines

Ahh, but there *isn't* a strict build dependency on them. We just want to make sure that if they're available that we enable them. If we have CONFIG_NET=n, then we certainly don't want to make CHECKPOINT depends on it.

Quoted 2 lines

Also - checkpoint is useful without *_NS, no? Forcing these things on seems a little user-hostile..

I concur.

Quoted 3 lines

I think the hostile thing is trying to completely unshare all the namespaces without checking to see which ones are enabled, first. ;)

I concur again :o

Will fix that.

Oren.

#5 lore raw
In reply to Dave Hansen
Quoted 23 lines · Dave Hansen
Quoted 7 lines · Nathan Lynch
Quoted 6 lines · Dave Hansen

diff -puN checkpoint/Kconfig~cr-kconfig-fixup checkpoint/Kconfig

checkpoint/Kconfig renamed from checkpoint/Kconfig~cr-kconfig-fixup +0 -0
@@ -7,9 +7,14 @@ config DEFERQUEUE
 	default n
 
Quoted 14 lines

checkpoint/Kconfig config DEFERQUEUE · line 17

Quoted 10 lines
checkpoint/Kconfig renamed from checkpoint/Kconfig~cr-kconfig-fixup +6 -1
 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

*_NS all depend on NAMESPACES at the very least; some have additional dependencies. Selecting a symbol without ensuring its dependencies are enabled is one way to break a build.

Quoted 4 lines

Ahh, but there *isn't* a strict build dependency on them. We just want to make sure that if they're available that we enable them. If we have CONFIG_NET=n, then we certainly don't want to make CHECKPOINT depends on it.

Sorry, I'm afraid I don't understand what you're saying here.

Here's a concrete example of what I'm talking about.

$ git checkout oren/ckpt-v16
$ make ARCH=i386 i386_defconfig
[ edit .config, enable CONFIG_CHECKPOINT and disable CONFIG_NET ]
$ make ARCH=i386 -s vmlinux   # which should succeed
[ apply your patch ]
$ make ARCH=i386 -s vmlinux
kernel/built-in.o: In function `free_nsproxy':
(.text+0x1daaf): undefined reference to `__put_net'
make: *** [.tmp_vmlinux1] Error 1

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 12 lines · Nathan Lynch
Quoted 1 line

Ahh, but there *isn't* a strict build dependency on them. We just

want

Quoted 1 line

to make sure that if they're available that we enable them. If we

have

Quoted 1 line

CONFIG_NET=n, then we certainly don't want to make CHECKPOINT

depends on

Quoted 1 line

it.

Sorry, I'm afraid I don't understand what you're saying here.

Here's a concrete example of what I'm talking about.

Quoted 9 lines
$ git checkout oren/ckpt-v16
$ make ARCH=i386 i386_defconfig
[ edit .config, enable CONFIG_CHECKPOINT and disable CONFIG_NET ]
$ make ARCH=i386 -s vmlinux   # which should succeed
[ apply your patch ]
$ make ARCH=i386 -s vmlinux
kernel/built-in.o: In function `free_nsproxy':
(.text+0x1daaf): undefined reference to `__put_net'
make: *** [.tmp_vmlinux1] Error 1

Kconfig is almost as retarded as me. :) Thanks for the cluebat.

-- Dave

#8 lore raw
In reply to a message not in the archive
Quoted 16 lines · Dave Hansen

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

Quoted 2 lines

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

Yes the selects are needed imo.

-serge