2006-08-25 04:32:51

by Randy Dunlap

[permalink] [raw]
Subject: another NUMA build error

Hi,
I was just trying to reproduce that 'register_one_node'
build error (and couldn't even with the supplied .config file;
weird). Anyway, after I enabled CONFIG_NUMA (but not CONFIG_ACPI),
I got the following error message. Seems that some config
options should prevent this config from even being possible
to create. Any ideas or suggestions?

This is still on 2.6.18-rc4-git1.

scripts/kconfig/conf -s arch/i386/Kconfig
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CC arch/i386/kernel/asm-offsets.s
In file included from include/asm/mmzone.h:18,
from include/linux/mmzone.h:439,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from include/linux/percpu.h:4,
from include/linux/rcupdate.h:41,
from include/linux/pid.h:4,
from include/linux/sched.h:70,
from include/linux/module.h:9,
from include/linux/crypto.h:20,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/srat.h:31:2: error: #error CONFIG_ACPI_SRAT not defined, and srat.h header has been included
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

config file is attached.

---
~Randy


Attachments:
config-srat-err (33.64 kB)

2006-08-25 05:41:16

by Kamezawa Hiroyuki

[permalink] [raw]
Subject: Re: another NUMA build error

On Thu, 24 Aug 2006 21:35:59 -0700
"Randy.Dunlap" <[email protected]> wrote:

> Hi,
> I was just trying to reproduce that 'register_one_node'
> build error (and couldn't even with the supplied .config file;
> weird). Anyway, after I enabled CONFIG_NUMA (but not CONFIG_ACPI),
> I got the following error message. Seems that some config
> options should prevent this config from even being possible
> to create. Any ideas or suggestions?
>
Hi, there are 2 ways.

1. allow only 2 configs for i386/NUMA
- CONFIG_NUMA + CONFIG_ACPI + CONFIG_ACPI_SRAT
- CONFIG_NUMA + CONFIG_X86_NUMAQ
2. allow this and fix include/asm-i386/mmzone.h
- CONFIG_NUMA + !CONFIG_ACP

Which is sane ?

-KameI


2006-08-25 17:31:58

by Randy Dunlap

[permalink] [raw]
Subject: Re: another NUMA build error

On Fri, 25 Aug 2006 14:43:50 +0900 KAMEZAWA Hiroyuki wrote:

> On Thu, 24 Aug 2006 21:35:59 -0700
> "Randy.Dunlap" <[email protected]> wrote:
>
> > Hi,
> > I was just trying to reproduce that 'register_one_node'
> > build error (and couldn't even with the supplied .config file;
> > weird). Anyway, after I enabled CONFIG_NUMA (but not CONFIG_ACPI),
> > I got the following error message. Seems that some config
> > options should prevent this config from even being possible
> > to create. Any ideas or suggestions?
> >
> Hi, there are 2 ways.
>
> 1. allow only 2 configs for i386/NUMA
> - CONFIG_NUMA + CONFIG_ACPI + CONFIG_ACPI_SRAT
> - CONFIG_NUMA + CONFIG_X86_NUMAQ
> 2. allow this and fix include/asm-i386/mmzone.h
> - CONFIG_NUMA + !CONFIG_ACP
>
> Which is sane ?

I really can't answer that one. The people who care about
NUMA would have to do that. It just shouldn't be possible
to make a config with a build error like this.

OK, I prefer option 2 because it is more generic (not hardware-
specific). Someone else can prefer option 1 because it is
hardware-specific. :)

---
~Randy

2006-08-25 18:32:04

by Kamezawa Hiroyuki

[permalink] [raw]
Subject: Re: another NUMA build error

On Fri, 25 Aug 2006 10:35:07 -0700
"Randy.Dunlap" <[email protected]> wrote:

> OK, I prefer option 2 because it is more generic (not hardware-
> specific). Someone else can prefer option 1 because it is
> hardware-specific. :)
>
ok. patch is here. but people who know x86-numa should confirm this.

-Kame
--
compile fix for

In file included from include/asm/mmzone.h:18,
from include/linux/mmzone.h:439,
<snip>
include/asm/srat.h:31:2: error: #error CONFIG_ACPI_SRAT not defined, and srat.h header has been included
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1

This can happen with CONFIG_NUMA && !CONFIG_ACPI && !CONFIG_X86_NUMAQ

Signed-Off-By: KAMEZAWA Hiroyuki <[email protected]>

include/asm-i386/mmzone.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.18-rc4/include/asm-i386/mmzone.h
===================================================================
--- linux-2.6.18-rc4.orig/include/asm-i386/mmzone.h
+++ linux-2.6.18-rc4/include/asm-i386/mmzone.h
@@ -14,7 +14,7 @@ extern struct pglist_data *node_data[];

#ifdef CONFIG_X86_NUMAQ
#include <asm/numaq.h>
-#else /* summit or generic arch */
+#elif defined(CONFIG_ACPI_SRAT)/* summit or generic arch */
#include <asm/srat.h>
#endif


2006-08-25 19:03:42

by Randy Dunlap

[permalink] [raw]
Subject: Re: another NUMA build error

On Sat, 26 Aug 2006 03:28:34 +0900 KAMEZAWA Hiroyuki wrote:

> On Fri, 25 Aug 2006 10:35:07 -0700
> "Randy.Dunlap" <[email protected]> wrote:
>
> > OK, I prefer option 2 because it is more generic (not hardware-
> > specific). Someone else can prefer option 1 because it is
> > hardware-specific. :)
> >
> ok. patch is here. but people who know x86-numa should confirm this.
>
> -Kame
> --
> compile fix for
>
> In file included from include/asm/mmzone.h:18,
> from include/linux/mmzone.h:439,
> <snip>
> include/asm/srat.h:31:2: error: #error CONFIG_ACPI_SRAT not defined, and srat.h header has been included
> make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
>
> This can happen with CONFIG_NUMA && !CONFIG_ACPI && !CONFIG_X86_NUMAQ
>
> Signed-Off-By: KAMEZAWA Hiroyuki <[email protected]>
>
> include/asm-i386/mmzone.h | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-2.6.18-rc4/include/asm-i386/mmzone.h
> ===================================================================
> --- linux-2.6.18-rc4.orig/include/asm-i386/mmzone.h
> +++ linux-2.6.18-rc4/include/asm-i386/mmzone.h
> @@ -14,7 +14,7 @@ extern struct pglist_data *node_data[];
>
> #ifdef CONFIG_X86_NUMAQ
> #include <asm/numaq.h>
> -#else /* summit or generic arch */
> +#elif defined(CONFIG_ACPI_SRAT)/* summit or generic arch */
> #include <asm/srat.h>
> #endif


That fixes mmzone.h but it still doesn't produce kernel that
will build without error:

arch/i386/mm/discontig.c: In function ‘zone_sizes_init’:
arch/i386/mm/discontig.c:388: warning: implicit declaration of function ‘get_zholes_size’
arch/i386/mm/discontig.c:388: warning: assignment makes pointer from integer without a cast

and:
LD .tmp_vmlinux1
arch/i386/mm/built-in.o: In function `zone_sizes_init':
(.init.text+0xd05): undefined reference to `get_zholes_size'
make: *** [.tmp_vmlinux1] Error 1

Same .config as in previous email.

---
~Randy

2006-08-25 22:58:06

by Randy Dunlap

[permalink] [raw]
Subject: Re: another NUMA build error

On Fri, 25 Aug 2006 15:44:58 -0700 Keith Mannthey wrote:

> On 8/25/06, Randy.Dunlap <[email protected]> wrote:
> > On Fri, 25 Aug 2006 14:43:50 +0900 KAMEZAWA Hiroyuki wrote:
> >
> > > On Thu, 24 Aug 2006 21:35:59 -0700
> > > "Randy.Dunlap" <[email protected]> wrote:
> > >
> > > > Hi,
> > > > I was just trying to reproduce that 'register_one_node'
> > > > build error (and couldn't even with the supplied .config file;
> > > > weird). Anyway, after I enabled CONFIG_NUMA (but not CONFIG_ACPI),
> > > > I got the following error message. Seems that some config
> > > > options should prevent this config from even being possible
> > > > to create. Any ideas or suggestions?
> > > >
> > > Hi, there are 2 ways.
> > >
> > > 1. allow only 2 configs for i386/NUMA
> > > - CONFIG_NUMA + CONFIG_ACPI + CONFIG_ACPI_SRAT
> > > - CONFIG_NUMA + CONFIG_X86_NUMAQ
> > > 2. allow this and fix include/asm-i386/mmzone.h
> > > - CONFIG_NUMA + !CONFIG_ACP
> > >
> > > Which is sane ?
> >
> > I really can't answer that one. The people who care about
> > NUMA would have to do that. It just shouldn't be possible
> > to make a config with a build error like this.
>
> I thought there was a patch fix a while ago to fix this build issue.
> If you want to anything that includes the SUMMIT sub arch you need
> CONFIG_ACPI_SRAT.
>
> Option 1 is a good solution as only NUMAQ and ACPI_SRAT have tables
> that are used to setup NUMA in the kernel.
>
> > OK, I prefer option 2 because it is more generic (not hardware-
> > specific). Someone else can prefer option 1 because it is
> > hardware-specific. :)
>
> I guess I am that other person. Really you only want/need NUMA if you
> have ACPI_SRAT (Summit) or NUMAQ.

That's fine. Any fix is OK with me, as long as a .config
won't generate a build error.

---
~Randy

2006-08-26 01:57:17

by Kamezawa Hiroyuki

[permalink] [raw]
Subject: Re: another NUMA build error

On Fri, 25 Aug 2006 16:01:15 -0700
"Randy.Dunlap" <[email protected]> wrote:

> > I thought there was a patch fix a while ago to fix this build issue.
> > If you want to anything that includes the SUMMIT sub arch you need
> > CONFIG_ACPI_SRAT.
> >
> > Option 1 is a good solution as only NUMAQ and ACPI_SRAT have tables
> > that are used to setup NUMA in the kernel.
> >
> > > OK, I prefer option 2 because it is more generic (not hardware-
> > > specific). Someone else can prefer option 1 because it is
> > > hardware-specific. :)
> >
> > I guess I am that other person. Really you only want/need NUMA if you
> > have ACPI_SRAT (Summit) or NUMAQ.
>
> That's fine. Any fix is OK with me, as long as a .config
> won't generate a build error.
>
Hmm... is this the way to go ?
Keith-san, please ack if Okay.
-Kame

--
When we select NUMA with i386, the system is only X86_NUMAQ or using ACPI.

Signed-Off-By: KAMEZAWA Hiroyuki <[email protected]>

Index: linux-2.6.18-rc4/arch/i386/Kconfig
===================================================================
--- linux-2.6.18-rc4.orig/arch/i386/Kconfig
+++ linux-2.6.18-rc4/arch/i386/Kconfig
@@ -142,6 +142,7 @@ config X86_SUMMIT
In particular, it is needed for the x440.

If you don't have one of these computers, you should say N here.
+ If you want to build NUMA kernel, you have to select ACPI

config X86_BIGSMP
bool "Support for other sub-arch SMP systems with more than 8 CPUs"
@@ -169,6 +170,7 @@ config X86_GENERICARCH
help
This option compiles in the Summit, bigsmp, ES7000, default subarchitectures.
It is intended for a generic binary kernel.
+ if you want NUMA kernel, select ACPI. we need SRAT for build NUMA

config X86_ES7000
bool "Support for Unisys ES7000 IA32 series"
@@ -542,7 +544,7 @@ config X86_PAE
# Common NUMA Features
config NUMA
bool "Numa Memory Allocation and Scheduler Support"
- depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI))
+ depends on SMP && HIGHMEM64G && (X86_NUMAQ || (X86_SUMMIT || X86_GENERICARCH) && ACPI)
default n if X86_PC
default y if (X86_NUMAQ || X86_SUMMIT)


2006-08-26 04:13:55

by Randy Dunlap

[permalink] [raw]
Subject: Re: another NUMA build error

> >
> Hmm... is this the way to go ?
> Keith-san, please ack if Okay.

Works for me. No build errors. Thanks.
There are a couple of typos noted below that could be fixed up.

> --
> When we select NUMA with i386, the system is only X86_NUMAQ or using ACPI.
>
> Signed-Off-By: KAMEZAWA Hiroyuki <[email protected]>
>
> Index: linux-2.6.18-rc4/arch/i386/Kconfig
> ===================================================================
> --- linux-2.6.18-rc4.orig/arch/i386/Kconfig
> +++ linux-2.6.18-rc4/arch/i386/Kconfig
> @@ -142,6 +142,7 @@ config X86_SUMMIT
> In particular, it is needed for the x440.
>
> If you don't have one of these computers, you should say N here.
> + If you want to build NUMA kernel, you have to select ACPI

end with '.'

>
> config X86_BIGSMP
> bool "Support for other sub-arch SMP systems with more than 8 CPUs"
> @@ -169,6 +170,7 @@ config X86_GENERICARCH
> help
> This option compiles in the Summit, bigsmp, ES7000, default subarchitectures.
> It is intended for a generic binary kernel.
> + if you want NUMA kernel, select ACPI. we need SRAT for build NUMA

If you want a NUMA kernel, enable ACPI. We need SRAT to build NUMA.

>
> config X86_ES7000
> bool "Support for Unisys ES7000 IA32 series"
> @@ -542,7 +544,7 @@ config X86_PAE
> # Common NUMA Features
> config NUMA
> bool "Numa Memory Allocation and Scheduler Support"
> - depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI))
> + depends on SMP && HIGHMEM64G && (X86_NUMAQ || (X86_SUMMIT || X86_GENERICARCH) && ACPI)
> default n if X86_PC
> default y if (X86_NUMAQ || X86_SUMMIT)


---
~Randy