diff mbox

[v2,3/3] tmem: allow tmem to be disabled with Kconfig

Message ID 20160316073506.GA31125@char.us.oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Konrad Rzeszutek Wilk March 16, 2016, 7:35 a.m. UTC
On Tue, Mar 15, 2016 at 03:18:50PM -0500, Doug Goldstein wrote:
> Wrap the various tmem functions with the Kconfig generated CONFIG_TMEM
> option allowing users to build Xen without tmem support.

I ended with this change on top of yours (which I will squash):

The 'bool "tmem" so that if I did make an change in .config
file it would still take effect even if I forgot XEN_CONFIG_EXPERT.

Otherwise it would keep on making it

CONFIG_TMEM=y
instead of the

# CONFIG_TMEM is not set.

which I wrote in the .config file.

From b9d173eb0e0e1274c784fde5580b119d6f7b4bdc Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Wed, 16 Mar 2016 03:28:39 -0400
Subject: [PATCH] squash!     tmem: allow tmem to be disabled with Kconfig

---
 xen/common/Kconfig | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Jan Beulich March 16, 2016, 8:39 a.m. UTC | #1
>>> On 16.03.16 at 08:35, <konrad.wilk@oracle.com> wrote:
> On Tue, Mar 15, 2016 at 03:18:50PM -0500, Doug Goldstein wrote:
>> Wrap the various tmem functions with the Kconfig generated CONFIG_TMEM
>> option allowing users to build Xen without tmem support.
> 
> I ended with this change on top of yours (which I will squash):
> 
> The 'bool "tmem" so that if I did make an change in .config
> file it would still take effect even if I forgot XEN_CONFIG_EXPERT.
> 
> Otherwise it would keep on making it
> 
> CONFIG_TMEM=y
> instead of the
> 
> # CONFIG_TMEM is not set.
> 
> which I wrote in the .config file.
> 
> From b9d173eb0e0e1274c784fde5580b119d6f7b4bdc Mon Sep 17 00:00:00 2001
> From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Date: Wed, 16 Mar 2016 03:28:39 -0400
> Subject: [PATCH] squash!     tmem: allow tmem to be disabled with Kconfig
> 
> ---
>  xen/common/Kconfig | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/common/Kconfig b/xen/common/Kconfig
> index 39b0fa7..5bd8a84 100644
> --- a/xen/common/Kconfig
> +++ b/xen/common/Kconfig
> @@ -87,16 +87,21 @@ config LATE_HWDOM
>  
>  	  If unsure, say N.
>  
> -# Enables transactional memory support
> +# Enables transcendent memory support
>  config TMEM
>  	def_bool y
> -	prompt "Transactional Memory Support" if EXPERT = "y"
> +	bool "tmem"
> +	prompt "Transcendent Memory Support" if EXPERT = "y"
>  	---help---
>  	  Transcendent memory allows PV-aware guests to collaborate on memory
>  	  usage. Guests can 'swap' their memory to the hypervisor or have an
>  	  collective pool of memory shared across guests. The end result is
>  	  less memory usage by guests allowing higher guest density.
>  
> +	  You also have to enable it on the Xen commandline by using tmem=1
> +
> +	  If unsure, say Y.

But that will, afaict, disable tmem by default. Forgetting to set
XEN_CONFIG_EXPERT is, well, a mistake that results in a config
change just like the one you've observed.

Jan
Konrad Rzeszutek Wilk March 16, 2016, 8:55 a.m. UTC | #2
On Wed, Mar 16, 2016 at 02:39:02AM -0600, Jan Beulich wrote:
> >>> On 16.03.16 at 08:35, <konrad.wilk@oracle.com> wrote:
> > On Tue, Mar 15, 2016 at 03:18:50PM -0500, Doug Goldstein wrote:
> >> Wrap the various tmem functions with the Kconfig generated CONFIG_TMEM
> >> option allowing users to build Xen without tmem support.
> > 
> > I ended with this change on top of yours (which I will squash):
> > 
> > The 'bool "tmem" so that if I did make an change in .config
> > file it would still take effect even if I forgot XEN_CONFIG_EXPERT.
> > 
> > Otherwise it would keep on making it
> > 
> > CONFIG_TMEM=y
> > instead of the
> > 
> > # CONFIG_TMEM is not set.
> > 
> > which I wrote in the .config file.
> > 
> > From b9d173eb0e0e1274c784fde5580b119d6f7b4bdc Mon Sep 17 00:00:00 2001
> > From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > Date: Wed, 16 Mar 2016 03:28:39 -0400
> > Subject: [PATCH] squash!     tmem: allow tmem to be disabled with Kconfig
> > 
> > ---
> >  xen/common/Kconfig | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/xen/common/Kconfig b/xen/common/Kconfig
> > index 39b0fa7..5bd8a84 100644
> > --- a/xen/common/Kconfig
> > +++ b/xen/common/Kconfig
> > @@ -87,16 +87,21 @@ config LATE_HWDOM
> >  
> >  	  If unsure, say N.
> >  
> > -# Enables transactional memory support
> > +# Enables transcendent memory support
> >  config TMEM
> >  	def_bool y
> > -	prompt "Transactional Memory Support" if EXPERT = "y"
> > +	bool "tmem"
> > +	prompt "Transcendent Memory Support" if EXPERT = "y"
> >  	---help---
> >  	  Transcendent memory allows PV-aware guests to collaborate on memory
> >  	  usage. Guests can 'swap' their memory to the hypervisor or have an
> >  	  collective pool of memory shared across guests. The end result is
> >  	  less memory usage by guests allowing higher guest density.
> >  
> > +	  You also have to enable it on the Xen commandline by using tmem=1
> > +
> > +	  If unsure, say Y.
> 
> But that will, afaict, disable tmem by default. Forgetting to set

You are correct. I didn't clear my tree to test that. Removing that
bool "tmem".

> XEN_CONFIG_EXPERT is, well, a mistake that results in a config
> change just like the one you've observed.
> 
> Jan
>
diff mbox

Patch

diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 39b0fa7..5bd8a84 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -87,16 +87,21 @@  config LATE_HWDOM
 
 	  If unsure, say N.
 
-# Enables transactional memory support
+# Enables transcendent memory support
 config TMEM
 	def_bool y
-	prompt "Transactional Memory Support" if EXPERT = "y"
+	bool "tmem"
+	prompt "Transcendent Memory Support" if EXPERT = "y"
 	---help---
 	  Transcendent memory allows PV-aware guests to collaborate on memory
 	  usage. Guests can 'swap' their memory to the hypervisor or have an
 	  collective pool of memory shared across guests. The end result is
 	  less memory usage by guests allowing higher guest density.
 
+	  You also have to enable it on the Xen commandline by using tmem=1
+
+	  If unsure, say Y.
+
 # Adds support for Xenoprof
 config XENOPROF
 	def_bool y