freebsd-nq/sys/x86
Andriy Gapon 4725e6bff3 new x86 smp topology detection code
Previously, the code determined a topology of processing units
(hardware threads, cores, packages) and then deduced a cache topology
using certain assumptions.  The new code builds a topology that
includes both processing units and caches using the information
provided by the hardware.

At the moment, the discovered full topology is used only to creeate
a scheduling topology for SCHED_ULE.
There is no KPI for other kernel uses.

Summary:
- based on APIC ID derivation rules for Intel and AMD CPUs
- can handle non-uniform topologies
- requires homogeneous APIC ID assignment (same bit widths for ID
  components)
- topology for dual-node AMD CPUs may not be optimal
- topology for latest AMD CPU models may not be optimal as the code is
  several years old
- supports only thread/package/core/cache nodes

Todo:
  - AMD dual-node processors
  - latest AMD processors
  - NUMA nodes
  - checking for homogeneity of the APIC ID assignment across packages
  - more flexible cache placement within topology
  - expose topology to userland, e.g., via sysctl nodes

Long term todo:
  - KPI for CPU sharing and affinity with respect to various resources
    (e.g., two logical processors may share the same FPU, etc)

Reviewed by:	mav
Tested by:	mav
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D2728
2016-04-04 16:09:29 +00:00
..
acpica As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to 2016-02-22 09:02:20 +00:00
bios
cpufreq Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
include Type of the interrupt handlers on x86 cannot be expressed in C. 2016-03-29 19:56:48 +00:00
iommu Remove taskqueue_enqueue_fast(). 2016-03-01 17:47:32 +00:00
isa Silence PVS-Studio warning (V595). It can never be NULL here. 2016-02-23 23:57:24 +00:00
pci Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
x86 new x86 smp topology detection code 2016-04-04 16:09:29 +00:00
xen Replace all resource occurrences of '0UL/~0UL' with '0/~0'. 2016-03-03 05:07:35 +00:00