so it could fallback to normal numa.
also decouple genericarch numa with acpi.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 3105e40..ef48cb9 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -310,12 +310,12 @@ config X86_VISWS
and vice versa. See <file:Documentation/sgi-visws.txt> for details.config X86_GENERICARCH
- bool "Generic architecture (Summit, bigsmp, ES7000, default)"
+ bool "Generic architecture (NUMAQ, Summit, bigsmp, ES7000, default)"
depends on X86_32
help
- This option compiles in the Summit, bigsmp, ES7000, default subarchitectures.
- It is intended for a generic binary kernel.
- If you want a NUMA kernel, select ACPI. We need SRAT for NUMA.
+ This option compiles in the NUMAQ, Summit, bigsmp, ES7000, default
+ subarchitectures. It is intended for a generic binary kernel.
+ You need enable NUMA, otherwise NUMAQ is skipped.config X86_ES7000
bool "Support for Unisys ES7000 IA32 series"
@@ -911,9 +911,9 @@ config X86_PAE
config NUMA
bool "Numa Memory Allocation and Scheduler Support (EXPERIMENTAL)"
depends on SMP
- depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || (X86_SUMMIT || X86_GENERICARCH) && ACPI) && EXPERIMENTAL)
+ depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || X86_SUMMIT && ACPI) && EXPERIMENTAL)
default n if X86_PC
- default y if (X86_NUMAQ || X86_SUMMIT)
+ default y if (X86_NUMAQ || X86_SUMMIT || X86_GENERICARCH)
help
Enable NUMA (Non Uniform Memory Access) support.
The kernel will try to allocate memory used by a CPU on the
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index d10e727..1b12ac1 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -217,7 +217,7 @@ static char *vidmem;
static int vidport;
static int ...
Add statistics counters for slab defragmentation.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Christoph Lameter <cl@linux-foundation.org>---
Documentation/vm/slabinfo.c | 45 ++++++++++++++++++++++++++++++++++++--------
include/linux/slub_def.h | 6 +++++
mm/slub.c | 29 ++++++++++++++++++++++++++--
3 files changed, 70 insertions(+), 10 deletions(-)Index: linux-2.6/Documentation/vm/slabinfo.c
===================================================================
--- linux-2.6.orig/Documentation/vm/slabinfo.c 2008-07-31 12:18:58.000000000 -0500
+++ linux-2.6/Documentation/vm/slabinfo.c 2008-07-31 12:18:58.000000000 -0500
@@ -41,6 +41,9 @@
unsigned long cpuslab_flush, deactivate_full, deactivate_empty;
unsigned long deactivate_to_head, deactivate_to_tail;
unsigned long deactivate_remote_frees, order_fallback;
+ unsigned long shrink_calls, shrink_attempt_defrag, shrink_empty_slab;
+ unsigned long shrink_slab_skipped, shrink_slab_reclaimed;
+ unsigned long shrink_object_reclaim_failed;
int numa[MAX_NODES];
int numa_partial[MAX_NODES];
} slabinfo[MAX_SLABS];
@@ -79,6 +82,7 @@
int set_debug = 0;
int show_ops = 0;
int show_activity = 0;
+int show_defragcount = 0;/* Debug options */
int sanity = 0;
@@ -113,6 +117,7 @@
"-e|--empty Show empty slabs\n"
"-f|--first-alias Show first alias\n"
"-F|--defrag Show defragmentable caches\n"
+ "-G:--display-defrag Display defrag counters\n"
"-h|--help Show usage information\n"
"-i|--inverted Inverted list\n"
"-l|--slabs Show slabs\n"
@@ -300,6 +305,8 @@
{
if (show_activity)
printf("Name Objects Alloc Free %%Fast Fallb O\n");
+ else if (show_defragcount)
+ printf("Name Objects DefragRQ Slabs Success Empty Skipped Failed\n");
else
printf("Name ...
so it could fallback to normal numa.
NUMAQ depends on GENERICARCH
also decouple genericarch numa with acpi.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Index: linux-2.6/arch/x86/Kconfig
===================================================================
--- linux-2.6.orig/arch/x86/Kconfig
+++ linux-2.6/arch/x86/Kconfig
@@ -264,17 +264,6 @@ config X86_VOYAGER
If you do not specifically know you have a Voyager based machine,
say N here, otherwise the kernel you build will not be bootable.-config X86_NUMAQ
- bool "NUMAQ (IBM/Sequent)"
- depends on SMP && X86_32 && PCI
- select NUMA
- help
- This option is used for getting Linux to run on a (IBM/Sequent) NUMA
- multiquad box. This changes the way that processors are bootstrapped,
- and uses Clustered Logical APIC addressing mode instead of Flat Logical.
- You will need a new lynxer.elf file to flash your firmware with - send
- email to <Martin.Bligh@us.ibm.com>.
-
config X86_SUMMIT
bool "Summit/EXA (IBM x440)"
depends on X86_32 && SMP
@@ -307,12 +296,12 @@ config X86_VISWS
and vice versa. See <file:Documentation/sgi-visws.txt> for details.config X86_GENERICARCH
- bool "Generic architecture (Summit, bigsmp, ES7000, default)"
+ bool "Generic architecture (NUMAQ, Summit, bigsmp, ES7000, default)"
depends on X86_32
help
- This option compiles in the Summit, bigsmp, ES7000, default subarchitectures.
- It is intended for a generic binary kernel.
- If you want a NUMA kernel, select ACPI. We need SRAT for NUMA.
+ This option compiles in the NUMAQ, Summit, bigsmp, ES7000, default
+ subarchitectures. It is intended for a generic binary kernel.
+ You need enable NUMA, otherwise NUMAQ is skipped.config X86_ES7000
bool "Support for Unisys ES7000 IA32 series"
@@ -348,6 +337,17 @@ config X86_VSMPendchoice
+config X86_NUMAQ
+ bool "NUMAQ (IBM/Sequent)"
+ depends on SMP && X8...
so it could fallback to normal numa.
NUMAQ depends on GENERICARCH
also decouple genericarch numa with acpi.
also make it fallback to bigsmp if apicid > 8.v3: return early if not found_numaq in pci_numa_init
remove xquad_portio in misc.cSigned-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Index: linux-2.6/arch/x86/Kconfig
===================================================================
--- linux-2.6.orig/arch/x86/Kconfig
+++ linux-2.6/arch/x86/Kconfig
@@ -264,17 +264,6 @@ config X86_VOYAGER
If you do not specifically know you have a Voyager based machine,
say N here, otherwise the kernel you build will not be bootable.-config X86_NUMAQ
- bool "NUMAQ (IBM/Sequent)"
- depends on SMP && X86_32 && PCI
- select NUMA
- help
- This option is used for getting Linux to run on a (IBM/Sequent) NUMA
- multiquad box. This changes the way that processors are bootstrapped,
- and uses Clustered Logical APIC addressing mode instead of Flat Logical.
- You will need a new lynxer.elf file to flash your firmware with - send
- email to <Martin.Bligh@us.ibm.com>.
-
config X86_SUMMIT
bool "Summit/EXA (IBM x440)"
depends on X86_32 && SMP
@@ -307,12 +296,12 @@ config X86_VISWS
and vice versa. See <file:Documentation/sgi-visws.txt> for details.config X86_GENERICARCH
- bool "Generic architecture (Summit, bigsmp, ES7000, default)"
+ bool "Generic architecture (NUMAQ, Summit, bigsmp, ES7000, default)"
depends on X86_32
help
- This option compiles in the Summit, bigsmp, ES7000, default subarchitectures.
- It is intended for a generic binary kernel.
- If you want a NUMA kernel, select ACPI. We need SRAT for NUMA.
+ This option compiles in the NUMAQ, Summit, bigsmp, ES7000, default
+ subarchitectures. It is intended for a generic binary kernel.
+ You need enable NUMA, otherwise NUMAQ is skipped.config X86_ES7000
bool "Support for Unisys ES7000 IA32 series...
so it could fallback to normal numa.
NUMAQ depends on GENERICARCH
also decouple genericarch numa with acpi.
also make it fallback to bigsmp if apicid > 8.v3: return early if not found_numaq in pci_numa_init
remove xquad_portio in misc.c
v4: make summit, bigsmp and es7000 depend on GENERICARCH tooSigned-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Index: linux-2.6/arch/x86/Kconfig
===================================================================
--- linux-2.6.orig/arch/x86/Kconfig
+++ linux-2.6/arch/x86/Kconfig
@@ -264,36 +264,6 @@ config X86_VOYAGER
If you do not specifically know you have a Voyager based machine,
say N here, otherwise the kernel you build will not be bootable.-config X86_NUMAQ
- bool "NUMAQ (IBM/Sequent)"
- depends on SMP && X86_32 && PCI
- select NUMA
- help
- This option is used for getting Linux to run on a (IBM/Sequent) NUMA
- multiquad box. This changes the way that processors are bootstrapped,
- and uses Clustered Logical APIC addressing mode instead of Flat Logical.
- You will need a new lynxer.elf file to flash your firmware with - send
- email to <Martin.Bligh@us.ibm.com>.
-
-config X86_SUMMIT
- bool "Summit/EXA (IBM x440)"
- depends on X86_32 && SMP
- help
- This option is needed for IBM systems that use the Summit/EXA chipset.
- 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 a NUMA kernel, you must select ACPI.
-
-config X86_BIGSMP
- bool "Support for other sub-arch SMP systems with more than 8 CPUs"
- depends on X86_32 && SMP
- help
- This option is needed for the systems that have more than 8 CPUs
- and if the system is not of any sub-arch type above.
-
- If you don't have such a system, you should say N here.
-
config X86_VISWS
bool "SGI 320/540 (Visual Workstation)"
depends on X86_32 && !PCI
@@ -307,12 +277,33 @@ config X86_VISWS
and v...
so it could fallback to normal numa.
NUMAQ depends on GENERICARCH
also decouple genericarch numa with acpi.
also make it fallback to bigsmp if apicid > 8.v3: return early if not found_numaq in pci_numa_init
remove xquad_portio in misc.c
v4: make summit, bigsmp and es7000 depend on GENERICARCH too
v5: seperate apicid check for bigsmp to another patch
[PATCH] x86: introduce max_physical_apicid for bigsmp switchingSigned-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Index: linux-2.6/arch/x86/Kconfig
===================================================================
--- linux-2.6.orig/arch/x86/Kconfig
+++ linux-2.6/arch/x86/Kconfig
@@ -264,36 +264,6 @@ config X86_VOYAGER
If you do not specifically know you have a Voyager based machine,
say N here, otherwise the kernel you build will not be bootable.-config X86_NUMAQ
- bool "NUMAQ (IBM/Sequent)"
- depends on SMP && X86_32 && PCI
- select NUMA
- help
- This option is used for getting Linux to run on a (IBM/Sequent) NUMA
- multiquad box. This changes the way that processors are bootstrapped,
- and uses Clustered Logical APIC addressing mode instead of Flat Logical.
- You will need a new lynxer.elf file to flash your firmware with - send
- email to <Martin.Bligh@us.ibm.com>.
-
-config X86_SUMMIT
- bool "Summit/EXA (IBM x440)"
- depends on X86_32 && SMP
- help
- This option is needed for IBM systems that use the Summit/EXA chipset.
- 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 a NUMA kernel, you must select ACPI.
-
-config X86_BIGSMP
- bool "Support for other sub-arch SMP systems with more than 8 CPUs"
- depends on X86_32 && SMP
- help
- This option is needed for the systems that have more than 8 CPUs
- and if the system is not of any sub-arch type above.
-
- If you don't have such a system, you should say N here.
-
config X86_VISWS
bool "...
applied to tip/x86/mpparse, thanks.
Ingo
--
do not need reserve if it early scan smp table
we are checking mptable early for numaq, so don't need to reserve_bootmem for
it. bootmem is not there yet.do the samething like 64 bit.
find it on 64g above system from 64 bit kernel kexec to 32 bit kernel with
numaq supportSigned-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 6ae6090..7ac1b68 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -853,9 +853,13 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
smp_found_config = 1;
#endif
mpf_found = mpf;
-#ifdef CONFIG_X86_32
+
printk(KERN_INFO "found SMP MP-table at [%p] %08lx\n",
mpf, virt_to_phys(mpf));
+
+ if (!reserve)
+ return 1;
+#ifdef CONFIG_X86_32
reserve_bootmem(virt_to_phys(mpf), PAGE_SIZE,
BOOTMEM_DEFAULT);
if (mpf->mpf_physptr) {
@@ -877,9 +881,6 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
}#else
- if (!reserve)
- return 1;
-
reserve_bootmem_generic(virt_to_phys(mpf), PAGE_SIZE,
BOOTMEM_DEFAULT);
if (mpf->mpf_physptr)
--
fix typo in bigsmp switching
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
diff --git a/arch/x86/mach-generic/probe.c b/arch/x86/mach-generic/probe.c
index ba18dec..5a7e461 100644
--- a/arch/x86/mach-generic/probe.c
+++ b/arch/x86/mach-generic/probe.c
@@ -64,7 +64,7 @@ early_param("apic", parse_apic);void __init generic_bigsmp_probe(void)
{
-#if CONFIG_X86_BIGSMP
+#ifdef CONFIG_X86_BIGSMP
/*
* This routine is used to switch to bigsmp mode when
* - There is no apic= option specified by the user
--
Do you have a NUMA-Q to test this on? Also, what is the baseline here
Can we not just add && X86_GENERICARCH here instead of putting them in
If I am reading this right we are making all genericarch kernels NUMA,
which before they were not. Hmmm is that going to cause problems
elsewhere? Mind you can you get non-numa boxes any more?If its only NUMAQ which makes that requireemnt it seems wrong to add
Could this not be always compiled in? As long as found_numaq is never 1
Is there any reason we cannot use:
if (found_numaq)
numaq_mps_oem_check(mpc, oem, str);Also why is this dependant on 'early'. There doesn't seem to be such
Ok, that is a small change in pfn_valid for numaq, but essentially its a
On the face of it the idea seems sound. The NUMAQ changes look ok on a
quick scan. I will need to see this applied and tested to be sure its
really sane.-apw
--
because I wonder if extra early calling for mps_oem_check is safe for
thanks.
YH
--
one multi-sockets system with 3 or 4 ioapics, when 4 dualcore cpus or 2 quadcore cpus
installed, need to switch to bigsmp or physflat. because cpu apic id is [4,11]
instead of [0,7], and we need to check max apic id instead of cpu numbers.also add check for 32 bit when acpi is not compiled in or acpi=off
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Index: linux-2.6/arch/x86/kernel/apic_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic_32.c
+++ linux-2.6/arch/x86/kernel/apic_32.c
@@ -1520,6 +1520,9 @@ void __cpuinit generic_processor_info(in
*/
cpu = 0;+ if (apicid > max_physical_apicid)
+ max_physical_apicid = apicid;
+
/*
* Would be preferable to switch to bigsmp when CONFIG_HOTPLUG_CPU=y
* but we need to work other dependencies like SMP_SUSPEND etc
@@ -1527,7 +1530,7 @@ void __cpuinit generic_processor_info(in
* if (CPU_HOTPLUG_ENABLED || num_processors > 8)
* - Ashok Raj <ashok.raj@intel.com>
*/
- if (num_processors > 8) {
+ if (max_physical_apicid >= 8) {
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_INTEL:
if (!APIC_XAPIC(version)) {
Index: linux-2.6/arch/x86/kernel/apic_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic_64.c
+++ linux-2.6/arch/x86/kernel/apic_64.c
@@ -1092,6 +1092,9 @@ void __cpuinit generic_processor_info(in
*/
cpu = 0;
}
+ if (apicid > max_physical_apicid)
+ max_physical_apicid = apicid;
+
/* are we being called early in kernel startup? */
if (early_per_cpu_ptr(x86_cpu_to_apicid)) {
u16 *cpu_to_apicid = early_per_cpu_ptr(x86_cpu_to_apicid);
Index: linux-2.6/arch/x86/kernel/genapic_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/genapic_64.c
+++ linux-2.6/arch/x86/kernel/genapic_64.c
@@ -51,7 +51,7 @@ void __init setup_apic_routing(void)
else
#endif
...
applied to tip/x86/mpparse, thanks.
Ingo
--
Sam,
now NUMAQ depends on GENERICARCH.
and Ingo want to make oldconfig to migration NUMAQ....to select GENERICARCH...
scripts/kconfig/conf -o arch/x86/Kconfig
arch/x86/Kconfig:299:error: found recursive dependency:
X86_GENERICARCH -> X86_NUMAQ -> X86_GENERICARCH -> <choice>
make[1]: *** [oldconfig] Error 1
make: *** [oldconfig] Error 2YH
--
It is my understanding that special support for NUMAQ should die,
so the only remaning usage of CONFIG_NUMAQ is if set to select GENERICARCH.
In other words that you should not use CONFIG_NUMAQ anywhere in the code
but solely rely on GENERICARCH and then do runtime detection of the
other things.That has been my understanding of the discussions about eliminating the
subarch support - but obviosuly Ingo & Co are the ones with better
knowledge in this area.
My point is that NUMAQ should not be a visible option at all in
*config and solely be present to select GENERICARCH is set to Y
in a defconfig file.
So you would have something like:config NUMAQ
defbool nconfig GENERICARCH
default NUMAQI am though not sure if this works as expected when NUMAQ is not visible
but it should be trivial to test.Sam
--
in case someone don't want to build that special numaq code in.
I think we should make ES7000, Summit depend to GENERICARCH too.
YH
--
correct. If someone wants more restricted support, pure CONFIG_X86_PC
should do that fine.also, even GENERICARCH should have as little Kconfig implications as
possible. I.e. before your cleanups the subarch code was used to
implement something very non-PC, and it was done build-time - which is a
PITA in terms of testing and in terms of general complexity. We want to
remove those complications and eventually we want to remove the subarch
code altogether. (without narrowing hw support of course)Ingo
--
current
static struct genapic *apic_probe[] __initdata = {
#ifdef CONFIG_X86_NUMAQ
&apic_numaq,
#endif
&apic_summit,
&apic_bigsmp,
&apic_es7000,
&apic_default, /* must be last */
NULL,
};the apic_default is the 86_PC.
so could make GENERICARCH default to yes.
and have
static struct genapic *apic_probe[] __initdata = {
#ifdef CONFIG_X86_NUMAQ
&apic_numaq,
#endif
#ifdef CONFIG_X86_SUMMIT
&apic_summit,
#endif
#ifdef CONFIG_X86_BIGSMP
&apic_bigsmp,
#endif
#ifdef CONFIG_X86_ES7000
&apic_es7000,
Eendif
&apic_default, /* must be last */
NULL,
};also may expand probe a little bit...to cover other different.
YH
--
Hi Yinghai Lu.
Some random comments after skimming through the diff.
In general I like the simplification moving numaq.
But there is too much ifdef going on - and it
can be done better.
Part of this may belong in a followup patch - other partsI counted several places where you test for the above.
Can we move these dependencies to Kconfig?
It should looks roughtly like this in the Makefile:obj-$(CONFIG_X86_NUMAQ) += numaq_32.o
This ifdef should be found in a .h file defining a simple inline.
Then you could just do:
if (found_numaq())static? and introduce helper functions with proper
Use:
pci-$(CONFIG_X86_NUMAQ) := numa.o irq.oMove ifdef to .h files.
Create a dummy inline in a .h file for this function
so we can drop the ifdef here.Sam
--
Thanks, will check it.
YH
--
Yinghai, please get rid of the NUMAQ build option altogether and
eliminate the subarch.We should keep a compatibility CONFIG_X86_NUMAQ that selects
X86_GENERICARCH, so that 'make oldconfig' on a NUMAQ config does the
right thing - but it's not a subarch anymore nor anything
user-configurable.All that together would be a very nice simplification.
Ingo
--
how about the Summit, and ES7000? You still have the two entries for them.
Anyway, will remove entry in the list and make CONFIG_X86_NUMAQ select
X86_GENERICARCHand make the those ifdef only use X86_GENERICARCH...
YH
--
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Chuck Ebbert | Why do so many machines need "noapic"? |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Natalie Protasevich | [BUG] New Kernel Bugs |
