All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/x86: convert bigmem to Kconfig
@ 2016-01-08  2:55 Doug Goldstein
  2016-01-08  8:50 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Goldstein @ 2016-01-08  2:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Keir Fraser, Jan Beulich, Doug Goldstein

Convert the bigmem build option to Kconfig.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
The test:

$ grep CONFIG_BIGMEM .config
# CONFIG_BIGMEM is not set
$ pahole xen-syms -C page_info
....
	/* size: 32, cachelines: 1, members: 5 */

<rebuild Xen>

$ grep CONFIG_BIGMEM .config
CONFIG_BIGMEM=y
$ pahole xen-syms -C page_info
....
	/* size: 48, cachelines: 1, members: 5 */
---
 xen/arch/x86/Kconfig  | 12 ++++++++++++
 xen/arch/x86/Rules.mk |  2 --
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 7d2ed96..90b4216 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -25,6 +25,18 @@ config ARCH_DEFCONFIG
 
 menu "Architecture Features"
 
+config BIGMEM
+	bool "big memory support"
+	default n
+	---help---
+	  Allows Xen to support up to 123Tb of memory.
+
+	  This requires growing struct page_info from 32 to 48 bytes as well
+	  as shrinking the always accessible direct mapped memory range from
+	  5Tb to 3.5Tb.
+
+	  If unsure, say N.
+
 endmenu
 
 source "common/Kconfig"
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index b76a754..a108d24 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -23,7 +23,6 @@ $(call as-insn-check,CFLAGS,CC,".equ \"x\"$$(comma)1", \
                      '-D__OBJECT_LABEL__=$(subst $(BASEDIR)/,,$(CURDIR))/$$@')
 
 shadow-paging ?= y
-bigmem        ?= n
 
 CFLAGS += -mno-red-zone -mno-sse -fpic
 CFLAGS += -fno-asynchronous-unwind-tables
@@ -33,4 +32,3 @@ CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE
 endif
 
 CFLAGS-$(shadow-paging) += -DCONFIG_SHADOW_PAGING
-CFLAGS-$(bigmem)        += -DCONFIG_BIGMEM
-- 
2.4.10

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

* Re: [PATCH] arch/x86: convert bigmem to Kconfig
  2016-01-08  2:55 [PATCH] arch/x86: convert bigmem to Kconfig Doug Goldstein
@ 2016-01-08  8:50 ` Jan Beulich
  2016-01-08 14:19   ` Doug Goldstein
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2016-01-08  8:50 UTC (permalink / raw)
  To: Doug Goldstein; +Cc: Andrew Cooper, Keir Fraser, xen-devel

>>> On 08.01.16 at 03:55, <cardoe@cardoe.com> wrote:
> --- a/xen/arch/x86/Kconfig
> +++ b/xen/arch/x86/Kconfig
> @@ -25,6 +25,18 @@ config ARCH_DEFCONFIG
>  
>  menu "Architecture Features"
>  
> +config BIGMEM
> +	bool "big memory support"
> +	default n
> +	---help---
> +	  Allows Xen to support up to 123Tb of memory.
> +
> +	  This requires growing struct page_info from 32 to 48 bytes as well
> +	  as shrinking the always accessible direct mapped memory range from
> +	  5Tb to 3.5Tb.

Fundamentally okay, but I think the numbers should be dropped
(as they could easily become stale, since they reflect in the first
case just current state and in the second really just an
implementation detail). No strict need to re-submit (can be fixed
up upon commit), but I'd like to have your consent since this is
going to be under your name.

Jan

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

* Re: [PATCH] arch/x86: convert bigmem to Kconfig
  2016-01-08  8:50 ` Jan Beulich
@ 2016-01-08 14:19   ` Doug Goldstein
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Goldstein @ 2016-01-08 14:19 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, Keir Fraser, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1219 bytes --]

On 1/8/16 2:50 AM, Jan Beulich wrote:
>>>> On 08.01.16 at 03:55, <cardoe@cardoe.com> wrote:
>> --- a/xen/arch/x86/Kconfig
>> +++ b/xen/arch/x86/Kconfig
>> @@ -25,6 +25,18 @@ config ARCH_DEFCONFIG
>>  
>>  menu "Architecture Features"
>>  
>> +config BIGMEM
>> +	bool "big memory support"
>> +	default n
>> +	---help---
>> +	  Allows Xen to support up to 123Tb of memory.
>> +
>> +	  This requires growing struct page_info from 32 to 48 bytes as well
>> +	  as shrinking the always accessible direct mapped memory range from
>> +	  5Tb to 3.5Tb.
> 
> Fundamentally okay, but I think the numbers should be dropped
> (as they could easily become stale, since they reflect in the first
> case just current state and in the second really just an
> implementation detail). No strict need to re-submit (can be fixed
> up upon commit), but I'd like to have your consent since this is
> going to be under your name.
> 
> Jan
> 

Yes that's fine. I just copied the original commit message that added
big mem support. I'm actually hoping that more people do what you're
proposing and provide better detailed messages when they understand how
that code works. So thank you!

-- 
Doug Goldstein


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-01-08 14:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-08  2:55 [PATCH] arch/x86: convert bigmem to Kconfig Doug Goldstein
2016-01-08  8:50 ` Jan Beulich
2016-01-08 14:19   ` Doug Goldstein

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.