------_=_NextPart_001_01C2A6E5.E30EDC40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
2.4.21-pre1 (i386) based patch to fix the issues with systems having =
more than
8 CPUs, in a generic way.
Motivation:
The current APIC destination mode ("Flat Logical") used in linux kernel =
has=20
an upper limit of 8 CPUs. For more than 8 CPUs, either "Clustered =
Logical" or
"Physical" mode has to be used.
There is already some code in current kernel (2.4.21-pre1), to support =
such=20
conditions. Specifically, IBM Summit, uses Physical mode, and IBM NUMAQ=20
uses clustered mode. But, there are some issues too:
- it is not generic enough to support any other more than 8 CPU system=20
out of the box. Supporting different systems may need more hacks in =
the code.=20
- clustered mode setup is tightly coupled with NUMA system. Whereas, in =
reality,
we can as well have logical clusters in a non-NUMA system as well.
- physical mode setup is somewhat tightly coupled with xAPIC. But, xAPIC =
doesn't
necessarily imply physical mode. You can as well have clustered mode =
with xAPIC
- APIC destination mode is selected based on particular OEM string.
These reasons together led to panics on other OEM systems with > 8 CPUS. =
The=20
patch tries to fix this issue in a generic way (in place of having =
multiple=20
hacks for different OEMs). Note, the patch only intends to change the=20
initialization of systems with more than 8 CPUs and it will not affect
other systems (apart from possible bugs in my code itself).
Description:
The basic idea is to use the number of processors detected on the =
system, to=20
decide on which APIC destination mode is to be used. Once all the CPU =
info, is=20
collected either from ACPI or MP table, we can check the total number of =
processors in the system.
If the number of processors in less than equal to 8,
then no change is required, and we can use the default, "Flat =
Logical" set up.
If the number of processors is more than 8
we can switch to clustered logical setup.=20
The logical clusters set up as follows.
Cluster 0 (CPU 0-3), Cluster 1 (CPU 4-7), Cluster 2 (CPU 8-11) and so =
on..
The other things that are done in the patch include:
- Separate out the NUMA specific stuff from APIC setup in cluster mode. =
Also,=20
NUMA has its own way of setting up the clusters, and doesn't follow =
the=20
logical cluster mapping defined above.
- Separate out xAPIC stuff from APIC destination setup. And the =
availability of=20
xAPIC support can actually be determined from the LAPIC version.
- physical mode support _removed_, as we can use clustered logical setup =
to=20
support can support upto a max of 60 CPUs. This is mainly because of =
the=20
advantage of being able to setup IOAPICs in LowestPrio, when using =
clustered mode.
The whole stuff is protected by 'Clustered APIC (> 8 CPUs) support
(CONFIG_X86_APIC_CLUSTER)' config option under Processor Type and =
Features.=20
But going forward, we can actually make this as default, as this doesn't =
affect the systems with less than equal to 8 CPUs (Apart from minor =
increase=20
in code size and couple of additional checks during boot up), but gives =
the=20
default support to more than 8 CPU systems.
Please let me know your comments/criticisms about this.=20
I was able to test this successfully on an 8-way with HT(16 logical)=20
CPU systems that I have access to. But, I haven't tested it on x440, or =
NUMAQ=20
systems. Would love to hear about the effect of this patch on these =
systems.
Thanks,
-Venkatesh
> -----Original Message-----
> From: Nakajima, Jun=20
> Sent: Thursday, December 12, 2002 7:06 PM
> To: jamesclv@us.ibm.com; Zwane Mwaikambo
> Cc: Martin Bligh; John Stultz; Linux Kernel
> Subject: RE: [PATCH][2.5][RFC] Using xAPIC apic address space=20
> on !Summit
>=20
>=20
> BTW, we are working on a xAPIC patch that supports more than=20
> 8 CPUs in a
> generic fashion (don't use hardcode OEM checking). We already=20
> tested it on
> two OEM systems with 16 CPUs.=20
> - It uses clustered mode. We don't want to use physical mode=20
> because it does
> not support lowest priority delivery mode.
> - We also check the version of the local APIC if it's xAPIC=20
> or not. It's
> possible that some other x86 architecture (other than P4P) uses xAPIC.
>=20
> Stay tuned.
>=20
> Jun
------_=_NextPart_001_01C2A6E5.E30EDC40
Content-Type: application/octet-stream;
name="cluster-2.4.21-pre1.patch"
Content-Transfer-Encoding: base64
Content-Description: cluster-2.4.21-pre1.patch
Content-Disposition: attachment;
filename="cluster-2.4.21-pre1.patch"
ZGlmZiAtdXJOIGxpbnV4LTIuNC4yMS1wcmUxLm9yZy9Eb2N1bWVudGF0aW9uL0NvbmZpZ3VyZS5o
ZWxwIGxpbnV4LXRlc3QxL0RvY3VtZW50YXRpb24vQ29uZmlndXJlLmhlbHAKLS0tIGxpbnV4LTIu
NC4yMS1wcmUxLm9yZy9Eb2N1bWV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8KLQkJCXJldHVybiBBUElDX0JST0FEQ0FTVF9JRF9BUElDOwotCQljYXNlIENMVVNURVJFRF9B
UElDX1hBUElDOgotCQkJLypyb3VuZCByb2JpbiB0aGUgaW50ZXJydXB0cyovCi0JCQljcHUgPSAo
Y3B1KzEpJXNtcF9udW1fY3B1czsKLQkJCXJldHVybiBjcHVfdG9fcGh5c2ljYWxfYXBpY2lkKGNw
dSk7CisjZGVmaW5lIEFQSUNfQlJPQURDQVNUX0NMVVNURVIJMHhmCisJCQlpZiAoY29uZmlndXJl
ZF9wbGF0Zm9ybV90eXBlID09IENPTkZJR1VSRURfUExBVEZPUk1fTlVNQSkKKwkJCQlyZXR1cm4g
QVBJQ19CUk9BRENBU1RfQ0xVU1RFUjsKKwkJCXJldHVybiAoY3B1X29ubGluZV9tYXAmQVBJQ19C
Uk9BRENBU1RfQ0xVU1RFUik7CiAJCWRlZmF1bHQ6CiAJfQogCXJldHVybiBjcHVfb25saW5lX21h
cDsK
------_=_NextPart_001_01C2A6E5.E30EDC40--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/