Skip to contentSkip to conversation

xen: tmem: selfballooning should be enabled when xen tmem is enabled

PATCH In review Dan Magenheimer 3 participants 11 messages Nov 20, 2012 – Nov 21, 2012 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: tmem: selfballooning should be enabled when xen tmem is enabled

Konrad: Any chance this can get in for the upcoming window? (Or is it enough of a bug fix that it can go in at an -rcN?)

It was just pointed out to me that some kernels have cleancache and frontswap and xen_tmem enabled but NOT xen_selfballooning! While this configuration should be possible, nearly all kernels that have CONFIG_XEN_TMEM=y should also have CONFIG_XEN_SELFBALLOONING=y, since Transcendent Memory (tmem) for Xen has very limited value without selfballooning.

This is probably a result of a Kconfig mistake fixed I think by the patch below. Note that the year-old Oracle UEK2 kernel distro has both CONFIG_XEN_TMEM and CONFIG_XEN_SELFBALLOONING enabled, as does a Fedora 17 kernel update (3.6.6-1.fc17), so the combination should be well tested. Also, Xen tmem (and thus selfballooning) are currently only enabled when a kernel boot parameter is supplied so there is no runtime impact without that boot parameter.

drivers/xen/Kconfig +3 -3
index d4dffcd..b5f02f3 100644
@@ -10,9 +10,9 @@ config XEN_BALLOON
 	  return unneeded memory to the system.
 
 config XEN_SELFBALLOONING
-	bool "Dynamically self-balloon kernel memory to target"
-	depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
-	default n
+	bool
+	depends on XEN_BALLOON && SWAP
+	default y if XEN_TMEM
 	help
 	  Self-ballooning dynamically balloons available kernel memory driven
 	  by the current usage of anonymous memory ("committed AS") and
#1 lore raw
Quoted 2 lines · Dan Magenheimer

Konrad: Any chance this can get in for the upcoming window? (Or is it enough of a bug fix that it can go in at an -rcN?)

Lets do it in the next merge window. About now I am comfortable only with regression fixes.

Quoted 37 lines

It was just pointed out to me that some kernels have cleancache and frontswap and xen_tmem enabled but NOT xen_selfballooning! While this configuration should be possible, nearly all kernels that have CONFIG_XEN_TMEM=y should also have CONFIG_XEN_SELFBALLOONING=y, since Transcendent Memory (tmem) for Xen has very limited value without selfballooning.

This is probably a result of a Kconfig mistake fixed I think by the patch below. Note that the year-old Oracle UEK2 kernel distro has both CONFIG_XEN_TMEM and CONFIG_XEN_SELFBALLOONING enabled, as does a Fedora 17 kernel update (3.6.6-1.fc17), so the combination should be well tested. Also, Xen tmem (and thus selfballooning) are currently only enabled when a kernel boot parameter is supplied so there is no runtime impact without that boot parameter.

drivers/xen/Kconfig +3 -3
index d4dffcd..b5f02f3 100644
@@ -10,9 +10,9 @@ config XEN_BALLOON
 	  return unneeded memory to the system.
 
 config XEN_SELFBALLOONING
-	bool "Dynamically self-balloon kernel memory to target"
-	depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
-	default n
+	bool
+	depends on XEN_BALLOON && SWAP
+	default y if XEN_TMEM
 	help
 	  Self-ballooning dynamically balloons available kernel memory driven
 	  by the current usage of anonymous memory ("committed AS") and
#2 lore raw
In reply to Dan Magenheimer
Quoted 2 lines · Dan Magenheimer

Konrad: Any chance this can get in for the upcoming window? (Or is it enough of a bug fix that it can go in at an -rcN?)

Lets do it in the next merge window. About now I am comfortable only with regression fixes.

Quoted 37 lines

It was just pointed out to me that some kernels have cleancache and frontswap and xen_tmem enabled but NOT xen_selfballooning! While this configuration should be possible, nearly all kernels that have CONFIG_XEN_TMEM=y should also have CONFIG_XEN_SELFBALLOONING=y, since Transcendent Memory (tmem) for Xen has very limited value without selfballooning.

This is probably a result of a Kconfig mistake fixed I think by the patch below. Note that the year-old Oracle UEK2 kernel distro has both CONFIG_XEN_TMEM and CONFIG_XEN_SELFBALLOONING enabled, as does a Fedora 17 kernel update (3.6.6-1.fc17), so the combination should be well tested. Also, Xen tmem (and thus selfballooning) are currently only enabled when a kernel boot parameter is supplied so there is no runtime impact without that boot parameter.

drivers/xen/Kconfig +3 -3
index d4dffcd..b5f02f3 100644
@@ -10,9 +10,9 @@ config XEN_BALLOON
 	  return unneeded memory to the system.
 
 config XEN_SELFBALLOONING
-	bool "Dynamically self-balloon kernel memory to target"
-	depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
-	default n
+	bool
+	depends on XEN_BALLOON && SWAP
+	default y if XEN_TMEM
 	help
 	  Self-ballooning dynamically balloons available kernel memory driven
 	  by the current usage of anonymous memory ("committed AS") and
#3 lore raw
Quoted 6 lines

From: Konrad Rzeszutek Wilk
Sent: Tuesday, November 20, 2012 7:48 PM
To: Dan Magenheimer
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] xen: tmem: selfballooning should be enabled when xen tmem is enabled

Quoted 6 lines
Quoted 2 lines · Dan Magenheimer

Konrad: Any chance this can get in for the upcoming window? (Or is it enough of a bug fix that it can go in at an -rcN?)

Lets do it in the next merge window. About now I am comfortable only with regression fixes.

OK, thanks!

Quoted 36 lines
Quoted 36 lines

It was just pointed out to me that some kernels have cleancache and frontswap and xen_tmem enabled but NOT xen_selfballooning! While this configuration should be possible, nearly all kernels that have CONFIG_XEN_TMEM=y should also have CONFIG_XEN_SELFBALLOONING=y, since Transcendent Memory (tmem) for Xen has very limited value without selfballooning.

This is probably a result of a Kconfig mistake fixed I think by the patch below. Note that the year-old Oracle UEK2 kernel distro has both CONFIG_XEN_TMEM and CONFIG_XEN_SELFBALLOONING enabled, as does a Fedora 17 kernel update (3.6.6-1.fc17), so the combination should be well tested. Also, Xen tmem (and thus selfballooning) are currently only enabled when a kernel boot parameter is supplied so there is no runtime impact without that boot parameter.

drivers/xen/Kconfig +3 -3
index d4dffcd..b5f02f3 100644
@@ -10,9 +10,9 @@ config XEN_BALLOON
 	  return unneeded memory to the system.
 
 config XEN_SELFBALLOONING
-	bool "Dynamically self-balloon kernel memory to target"
-	depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
-	default n
+	bool
+	depends on XEN_BALLOON && SWAP
+	default y if XEN_TMEM
 	help
 	  Self-ballooning dynamically balloons available kernel memory driven
 	  by the current usage of anonymous memory ("committed AS") and
#4 lore raw
In reply to Konrad Rzeszutek Wilk
Quoted 6 lines

From: Konrad Rzeszutek Wilk
Sent: Tuesday, November 20, 2012 7:48 PM
To: Dan Magenheimer
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] xen: tmem: selfballooning should be enabled when xen tmem is enabled

Quoted 6 lines
Quoted 2 lines · Dan Magenheimer

Konrad: Any chance this can get in for the upcoming window? (Or is it enough of a bug fix that it can go in at an -rcN?)

Lets do it in the next merge window. About now I am comfortable only with regression fixes.

OK, thanks!

Quoted 36 lines
Quoted 36 lines

It was just pointed out to me that some kernels have cleancache and frontswap and xen_tmem enabled but NOT xen_selfballooning! While this configuration should be possible, nearly all kernels that have CONFIG_XEN_TMEM=y should also have CONFIG_XEN_SELFBALLOONING=y, since Transcendent Memory (tmem) for Xen has very limited value without selfballooning.

This is probably a result of a Kconfig mistake fixed I think by the patch below. Note that the year-old Oracle UEK2 kernel distro has both CONFIG_XEN_TMEM and CONFIG_XEN_SELFBALLOONING enabled, as does a Fedora 17 kernel update (3.6.6-1.fc17), so the combination should be well tested. Also, Xen tmem (and thus selfballooning) are currently only enabled when a kernel boot parameter is supplied so there is no runtime impact without that boot parameter.

drivers/xen/Kconfig +3 -3
index d4dffcd..b5f02f3 100644
@@ -10,9 +10,9 @@ config XEN_BALLOON
 	  return unneeded memory to the system.
 
 config XEN_SELFBALLOONING
-	bool "Dynamically self-balloon kernel memory to target"
-	depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
-	default n
+	bool
+	depends on XEN_BALLOON && SWAP
+	default y if XEN_TMEM
 	help
 	  Self-ballooning dynamically balloons available kernel memory driven
 	  by the current usage of anonymous memory ("committed AS") and
#5 lore raw
In reply to Dan Magenheimer
Quoted 28 lines
Quoted 1 line
Quoted 1 line · Dan Magenheimer

Konrad: Any chance this can get in for the upcoming window? (Or is it enough of a bug fix that it can go in at an -rcN?)

It was just pointed out to me that some kernels have cleancache and frontswap and xen_tmem enabled but NOT xen_selfballooning! While this configuration should be possible, nearly all kernels that have CONFIG_XEN_TMEM=y should also have CONFIG_XEN_SELFBALLOONING=y, since Transcendent Memory (tmem) for Xen has very limited value without selfballooning.

This is probably a result of a Kconfig mistake fixed I think by the patch below. Note that the year-old Oracle UEK2 kernel distro has both CONFIG_XEN_TMEM and CONFIG_XEN_SELFBALLOONING enabled, as does a Fedora 17 kernel update (3.6.6-1.fc17), so the combination should be well tested. Also, Xen tmem (and thus selfballooning) are currently only enabled when a kernel boot parameter is supplied so there is no runtime impact without that boot parameter.

drivers/xen/Kconfig +0 -0
index d4dffcd..b5f02f3 100644

drivers/xen/Kconfig config XEN_BALLOON · line 13

Quoted 4 lines
drivers/xen/Kconfig +0 -1
@@ -10,9 +10,9 @@ config XEN_BALLOON
 	  return unneeded memory to the system.
 
 config XEN_SELFBALLOONING
-	bool "Dynamically self-balloon kernel memory to target"

Why would you want to take away the configurability of this? You wanting it always on in your use case doesn't mean everyone agrees. This would be the right way only when the option being off despite all its dependencies being enabled is actively wrong.

drivers/xen/Kconfig config XEN_BALLOON · line 15

Quoted 5 lines
drivers/xen/Kconfig +3 -2
-	depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
-	default n
+	bool
+	depends on XEN_BALLOON && SWAP
+	default y if XEN_TMEM

Changing the default, otoh, is certainly acceptable. However, this should imo be (assuming that you dropped the CLEANCACHE dependency for an unrelated [and unexplained] reason),

	depends on XEN_BALLOON && SWAP && XEN_TMEM
	default XEN_TMEM

i.e. the default selection can be simplified, but if you indeed have a good reason to drop the prompt, the dependencies should continue to include the symbol referenced by the default directive, as otherwise you may end up with a .config pointlessly having

# CONFIG_XEN_SELFBALLOONING is disabled. This is particularly annoying when subsequently this gets a prompt re-added, since at that point a "make oldconfig" won't ask for the item to get possibly enabled as there is a value known for it already.

drivers/xen/Kconfig config XEN_BALLOON · line 18

Quoted 3 lines
drivers/xen/Kconfig +0 -0
 	help
 	  Self-ballooning dynamically balloons available kernel memory driven
 	  by the current usage of anonymous memory ("committed AS") and

If you take away the prompt, keeping the help text isn't useful either.

Jan

#6 lore raw
Quoted 36 lines

From: Jan Beulich [mailto:[email protected]]
Sent: Wednesday, November 21, 2012 1:21 AM
To: Dan Magenheimer
Cc: [email protected]; Konrad Wilk; [email protected]
Subject: Re: [Xen-devel] [PATCH] xen: tmem: selfballooning should be enabled when xen tmem is enabled

Quoted 30 lines
Quoted 1 line
Quoted 1 line · Dan Magenheimer

Konrad: Any chance this can get in for the upcoming window? (Or is it enough of a bug fix that it can go in at an -rcN?)

It was just pointed out to me that some kernels have cleancache and frontswap and xen_tmem enabled but NOT xen_selfballooning! While this configuration should be possible, nearly all kernels that have CONFIG_XEN_TMEM=y should also have CONFIG_XEN_SELFBALLOONING=y, since Transcendent Memory (tmem) for Xen has very limited value without selfballooning.

This is probably a result of a Kconfig mistake fixed I think by the patch below. Note that the year-old Oracle UEK2 kernel distro has both CONFIG_XEN_TMEM and CONFIG_XEN_SELFBALLOONING enabled, as does a Fedora 17 kernel update (3.6.6-1.fc17), so the combination should be well tested. Also, Xen tmem (and thus selfballooning) are currently only enabled when a kernel boot parameter is supplied so there is no runtime impact without that boot parameter.

drivers/xen/Kconfig +0 -0
index d4dffcd..b5f02f3 100644
@@ -10,9 +10,9 @@ config XEN_BALLOON
 	  return unneeded memory to the system.
 
Quoted 7 lines

drivers/xen/Kconfig config XEN_BALLOON · line 13

Quoted 2 lines
drivers/xen/Kconfig +0 -1
 config XEN_SELFBALLOONING
-	bool "Dynamically self-balloon kernel memory to target"

Why would you want to take away the configurability of this? You wanting it always on in your use case doesn't mean everyone agrees. This would be the right way only when the option being off despite all its dependencies being enabled is actively wrong.

I'd like it to be configurable, but my config steps (e.g. yes "" | make oldconfig, after enabling CLEANCACHE and FRONTSWAP and XEN_TMEM) failed to enable it. Removing the prompt is the only thing that worked.

Quoted 24 lines

drivers/xen/Kconfig config XEN_BALLOON · line 15

Quoted 5 lines
drivers/xen/Kconfig +3 -2
-	depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
-	default n
+	bool
+	depends on XEN_BALLOON && SWAP
+	default y if XEN_TMEM

Changing the default, otoh, is certainly acceptable. However, this should imo be (assuming that you dropped the CLEANCACHE dependency for an unrelated [and unexplained] reason),

	depends on XEN_BALLOON && SWAP && XEN_TMEM
	default XEN_TMEM

i.e. the default selection can be simplified, but if you indeed have a good reason to drop the prompt, the dependencies should continue to include the symbol referenced by the default directive, as otherwise you may end up with a .config pointlessly having

# CONFIG_XEN_SELFBALLOONING is disabled. This is particularly annoying when subsequently this gets a prompt re-added, since at that point a "make oldconfig" won't ask for the item to get possibly enabled as there is a value known for it already.

Quoted 6 lines

drivers/xen/Kconfig config XEN_BALLOON · line 18

Quoted 3 lines
drivers/xen/Kconfig +0 -0
 	help
 	  Self-ballooning dynamically balloons available kernel memory driven
 	  by the current usage of anonymous memory ("committed AS") and

If you take away the prompt, keeping the help text isn't useful either.

Thanks for the feedback. I'm an idiot with Kconfig and have to play with it until it works as I expect. Since Konrad isn't going to accept it for the upcoming window anyway, I'll play with it some more, but if the answer is obvious, please spoon feed it to me. :-)

Dan

P.S. I removed the CLEANCACHE dependency because that dependency is present for XEN_TMEM and I assumed dependencies are transitive.

#7 lore raw
In reply to Jan Beulich
Quoted 36 lines

From: Jan Beulich [mailto:[email protected]]
Sent: Wednesday, November 21, 2012 1:21 AM
To: Dan Magenheimer
Cc: [email protected]; Konrad Wilk; [email protected]
Subject: Re: [Xen-devel] [PATCH] xen: tmem: selfballooning should be enabled when xen tmem is enabled

Quoted 30 lines
Quoted 1 line
Quoted 1 line · Dan Magenheimer

Konrad: Any chance this can get in for the upcoming window? (Or is it enough of a bug fix that it can go in at an -rcN?)

It was just pointed out to me that some kernels have cleancache and frontswap and xen_tmem enabled but NOT xen_selfballooning! While this configuration should be possible, nearly all kernels that have CONFIG_XEN_TMEM=y should also have CONFIG_XEN_SELFBALLOONING=y, since Transcendent Memory (tmem) for Xen has very limited value without selfballooning.

This is probably a result of a Kconfig mistake fixed I think by the patch below. Note that the year-old Oracle UEK2 kernel distro has both CONFIG_XEN_TMEM and CONFIG_XEN_SELFBALLOONING enabled, as does a Fedora 17 kernel update (3.6.6-1.fc17), so the combination should be well tested. Also, Xen tmem (and thus selfballooning) are currently only enabled when a kernel boot parameter is supplied so there is no runtime impact without that boot parameter.

drivers/xen/Kconfig +0 -0
index d4dffcd..b5f02f3 100644
@@ -10,9 +10,9 @@ config XEN_BALLOON
 	  return unneeded memory to the system.
 
Quoted 7 lines

drivers/xen/Kconfig config XEN_BALLOON · line 13

Quoted 2 lines
drivers/xen/Kconfig +0 -1
 config XEN_SELFBALLOONING
-	bool "Dynamically self-balloon kernel memory to target"

Why would you want to take away the configurability of this? You wanting it always on in your use case doesn't mean everyone agrees. This would be the right way only when the option being off despite all its dependencies being enabled is actively wrong.

I'd like it to be configurable, but my config steps (e.g. yes "" | make oldconfig, after enabling CLEANCACHE and FRONTSWAP and XEN_TMEM) failed to enable it. Removing the prompt is the only thing that worked.

Quoted 24 lines

drivers/xen/Kconfig config XEN_BALLOON · line 15

Quoted 5 lines
drivers/xen/Kconfig +3 -2
-	depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
-	default n
+	bool
+	depends on XEN_BALLOON && SWAP
+	default y if XEN_TMEM

Changing the default, otoh, is certainly acceptable. However, this should imo be (assuming that you dropped the CLEANCACHE dependency for an unrelated [and unexplained] reason),

	depends on XEN_BALLOON && SWAP && XEN_TMEM
	default XEN_TMEM

i.e. the default selection can be simplified, but if you indeed have a good reason to drop the prompt, the dependencies should continue to include the symbol referenced by the default directive, as otherwise you may end up with a .config pointlessly having

# CONFIG_XEN_SELFBALLOONING is disabled. This is particularly annoying when subsequently this gets a prompt re-added, since at that point a "make oldconfig" won't ask for the item to get possibly enabled as there is a value known for it already.

Quoted 6 lines

drivers/xen/Kconfig config XEN_BALLOON · line 18

Quoted 3 lines
drivers/xen/Kconfig +0 -0
 	help
 	  Self-ballooning dynamically balloons available kernel memory driven
 	  by the current usage of anonymous memory ("committed AS") and

If you take away the prompt, keeping the help text isn't useful either.

Thanks for the feedback. I'm an idiot with Kconfig and have to play with it until it works as I expect. Since Konrad isn't going to accept it for the upcoming window anyway, I'll play with it some more, but if the answer is obvious, please spoon feed it to me. :-)

Dan

P.S. I removed the CLEANCACHE dependency because that dependency is present for XEN_TMEM and I assumed dependencies are transitive.

#8 lore raw
Quoted 46 lines
Quoted 6 lines
Quoted 1 line · Dan Magenheimer

From: Jan Beulich [mailto:[email protected]]
Sent: Wednesday, November 21, 2012 1:21 AM
To: Dan Magenheimer
Cc: [email protected]; Konrad Wilk; [email protected]
Subject: Re: [Xen-devel] [PATCH] xen: tmem: selfballooning should be enabled

when xen tmem is enabled

Quoted 31 lines
Quoted 31 lines
Quoted 2 lines
Quoted 2 lines · Dan Magenheimer

Konrad: Any chance this can get in for the upcoming window? (Or is it enough of a bug fix that it can go in at an -rcN?)

It was just pointed out to me that some kernels have cleancache and frontswap and xen_tmem enabled but NOT xen_selfballooning! While this configuration should be possible, nearly all kernels that have CONFIG_XEN_TMEM=y should also have CONFIG_XEN_SELFBALLOONING=y, since Transcendent Memory (tmem) for Xen has very limited value without selfballooning.

This is probably a result of a Kconfig mistake fixed I think by the patch below. Note that the year-old Oracle UEK2 kernel distro has both CONFIG_XEN_TMEM and CONFIG_XEN_SELFBALLOONING enabled, as does a Fedora 17 kernel update (3.6.6-1.fc17), so the combination should be well tested. Also, Xen tmem (and thus selfballooning) are currently only enabled when a kernel boot parameter is supplied so there is no runtime impact without that boot parameter.

drivers/xen/Kconfig +0 -0
index d4dffcd..b5f02f3 100644
@@ -10,9 +10,9 @@ config XEN_BALLOON
 	  return unneeded memory to the system.
 
Quoted 7 lines

drivers/xen/Kconfig config XEN_BALLOON · line 13

Quoted 2 lines
drivers/xen/Kconfig +0 -1
 config XEN_SELFBALLOONING
-	bool "Dynamically self-balloon kernel memory to target"

Why would you want to take away the configurability of this? You wanting it always on in your use case doesn't mean everyone agrees. This would be the right way only when the option being off despite all its dependencies being enabled is actively wrong.

Quoted 4 lines

I'd like it to be configurable, but my config steps (e.g. yes "" | make oldconfig, after enabling CLEANCACHE and FRONTSWAP and XEN_TMEM) failed to enable it. Removing the prompt is the only thing that worked.

If all of the dependencies are enabled, then I can't see why the prompt wouldn't show up.

Quoted 2 lines

P.S. I removed the CLEANCACHE dependency because that dependency is present for XEN_TMEM and I assumed dependencies are transitive.

That's correct.

Jan

#9 lore raw
In reply to Dan Magenheimer
Quoted 46 lines
Quoted 6 lines
Quoted 1 line · Dan Magenheimer

From: Jan Beulich [mailto:[email protected]]
Sent: Wednesday, November 21, 2012 1:21 AM
To: Dan Magenheimer
Cc: [email protected]; Konrad Wilk; [email protected]
Subject: Re: [Xen-devel] [PATCH] xen: tmem: selfballooning should be enabled

when xen tmem is enabled

Quoted 31 lines
Quoted 31 lines
Quoted 2 lines
Quoted 2 lines · Dan Magenheimer

Konrad: Any chance this can get in for the upcoming window? (Or is it enough of a bug fix that it can go in at an -rcN?)

It was just pointed out to me that some kernels have cleancache and frontswap and xen_tmem enabled but NOT xen_selfballooning! While this configuration should be possible, nearly all kernels that have CONFIG_XEN_TMEM=y should also have CONFIG_XEN_SELFBALLOONING=y, since Transcendent Memory (tmem) for Xen has very limited value without selfballooning.

This is probably a result of a Kconfig mistake fixed I think by the patch below. Note that the year-old Oracle UEK2 kernel distro has both CONFIG_XEN_TMEM and CONFIG_XEN_SELFBALLOONING enabled, as does a Fedora 17 kernel update (3.6.6-1.fc17), so the combination should be well tested. Also, Xen tmem (and thus selfballooning) are currently only enabled when a kernel boot parameter is supplied so there is no runtime impact without that boot parameter.

drivers/xen/Kconfig +0 -0
index d4dffcd..b5f02f3 100644
@@ -10,9 +10,9 @@ config XEN_BALLOON
 	  return unneeded memory to the system.
 
Quoted 7 lines

drivers/xen/Kconfig config XEN_BALLOON · line 13

Quoted 2 lines
drivers/xen/Kconfig +0 -1
 config XEN_SELFBALLOONING
-	bool "Dynamically self-balloon kernel memory to target"

Why would you want to take away the configurability of this? You wanting it always on in your use case doesn't mean everyone agrees. This would be the right way only when the option being off despite all its dependencies being enabled is actively wrong.

Quoted 4 lines

I'd like it to be configurable, but my config steps (e.g. yes "" | make oldconfig, after enabling CLEANCACHE and FRONTSWAP and XEN_TMEM) failed to enable it. Removing the prompt is the only thing that worked.

If all of the dependencies are enabled, then I can't see why the prompt wouldn't show up.

Quoted 2 lines

P.S. I removed the CLEANCACHE dependency because that dependency is present for XEN_TMEM and I assumed dependencies are transitive.

That's correct.

Jan

#10 lore raw
In reply to Dan Magenheimer
Quoted 28 lines
Quoted 1 line
Quoted 1 line · Dan Magenheimer

Konrad: Any chance this can get in for the upcoming window? (Or is it enough of a bug fix that it can go in at an -rcN?)

It was just pointed out to me that some kernels have cleancache and frontswap and xen_tmem enabled but NOT xen_selfballooning! While this configuration should be possible, nearly all kernels that have CONFIG_XEN_TMEM=y should also have CONFIG_XEN_SELFBALLOONING=y, since Transcendent Memory (tmem) for Xen has very limited value without selfballooning.

This is probably a result of a Kconfig mistake fixed I think by the patch below. Note that the year-old Oracle UEK2 kernel distro has both CONFIG_XEN_TMEM and CONFIG_XEN_SELFBALLOONING enabled, as does a Fedora 17 kernel update (3.6.6-1.fc17), so the combination should be well tested. Also, Xen tmem (and thus selfballooning) are currently only enabled when a kernel boot parameter is supplied so there is no runtime impact without that boot parameter.

drivers/xen/Kconfig +0 -0
index d4dffcd..b5f02f3 100644

drivers/xen/Kconfig config XEN_BALLOON · line 13

Quoted 4 lines
drivers/xen/Kconfig +0 -1
@@ -10,9 +10,9 @@ config XEN_BALLOON
 	  return unneeded memory to the system.
 
 config XEN_SELFBALLOONING
-	bool "Dynamically self-balloon kernel memory to target"

Why would you want to take away the configurability of this? You wanting it always on in your use case doesn't mean everyone agrees. This would be the right way only when the option being off despite all its dependencies being enabled is actively wrong.

drivers/xen/Kconfig config XEN_BALLOON · line 15

Quoted 5 lines
drivers/xen/Kconfig +3 -2
-	depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
-	default n
+	bool
+	depends on XEN_BALLOON && SWAP
+	default y if XEN_TMEM

Changing the default, otoh, is certainly acceptable. However, this should imo be (assuming that you dropped the CLEANCACHE dependency for an unrelated [and unexplained] reason),

	depends on XEN_BALLOON && SWAP && XEN_TMEM
	default XEN_TMEM

i.e. the default selection can be simplified, but if you indeed have a good reason to drop the prompt, the dependencies should continue to include the symbol referenced by the default directive, as otherwise you may end up with a .config pointlessly having

# CONFIG_XEN_SELFBALLOONING is disabled. This is particularly annoying when subsequently this gets a prompt re-added, since at that point a "make oldconfig" won't ask for the item to get possibly enabled as there is a value known for it already.

drivers/xen/Kconfig config XEN_BALLOON · line 18

Quoted 3 lines
drivers/xen/Kconfig +0 -0
 	help
 	  Self-ballooning dynamically balloons available kernel memory driven
 	  by the current usage of anonymous memory ("committed AS") and

If you take away the prompt, keeping the help text isn't useful either.

Jan